tsdb-reader 0.3.0

Read-only, zero-copy Prometheus TSDB block reader: index v1-v3, all chunk encodings, integer histograms, postings and label matchers, tombstones
Documentation
[package]
name = "tsdb-reader"
version = "0.3.0"
edition = "2021"
license = "MIT"
description = "Read-only, zero-copy Prometheus TSDB block reader: index v1-v3, all chunk encodings, integer histograms, postings and label matchers, tombstones"
repository = "https://github.com/zhuyanxi/tsdb-reader"
homepage = "https://github.com/zhuyanxi/tsdb-reader"
documentation = "https://docs.rs/tsdb-reader"
readme = "README.md"
keywords = ["prometheus", "tsdb", "metrics", "parser", "time-series"]
categories = ["database", "database-implementations", "encoding"]
rust-version = "1.77"
include = ["src/**", "tests/**", "benches/**", "README.md", "LICENSE", "LICENSE-APACHE", "NOTICE", "Cargo.toml"]

[features]
default = ["mmap", "crc", "meta", "regex"]
# File-backed memory mapping. Turn it off to build without `memmap2`; the
# readers fall back to loading segments into memory. `IndexReader::from_bytes`
# and `ChunkReader::from_segments` work with or without this feature.
mmap = ["dep:memmap2"]
# CRC32C verification of the index, chunk segments and tombstones. Turn it off
# to drop `crc32c`; `ReaderOptions::verify_crc` then becomes a no-op.
crc = ["dep:crc32c"]
# `meta.json` parsing: `read_meta`, `discover_blocks` and `BlockReader::open`.
# Turn it off to drop `serde_json` and pass a `BlockMeta` yourself through
# `BlockReader::open_with_meta`.
meta = ["dep:serde_json"]
# Regular-expression label matchers (`=~`, `!~`). Turn it off to drop the
# `regex` dependency; those match types then report `Error::Unsupported` while
# the equality matchers keep working.
regex = ["dep:regex"]

[dependencies]
memmap2 = { version = "0.9", optional = true }
crc32c = { version = "0.6", optional = true }
serde = { version = "1", features = ["derive"] }
regex = { version = "1", optional = true }
serde_json = { version = "1", optional = true }
thiserror = "2"

[dev-dependencies]
crc32c = "0.6"
serde_json = "1"
# Peak RSS reporting in the benchmark (getrusage); not used by the library.
libc = "0.2"

[[bench]]
name = "rss"
harness = false

[package.metadata.docs.rs]
all-features = true