[package]
name = "measured"
version = "0.0.25"
edition = "2024"
description = "A better way to measure your application statistics"
authors = ["Conrad Ludgate <conradludgate@gmail.com"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/conradludgate/measured"
readme = "../README.md"
rust-version = "1.88"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
default = []
paracord = ["dep:paracord"]
lasso = ["dep:lasso"]
indexmap = ["dep:indexmap"]
phf = ["dep:phf"]

[dependencies]
bytes = "1"
memchr = "2"
ryu = "1"
itoa = "1"
rustc-hash = "2"
hashbrown = { version = "0.15" }
parking_lot = "0.12"
crossbeam-utils = "0.8.0"
serde = "1"

measured-derive = { path = "../derive", version = "0.0.25" }

indexmap = { version = "2", optional = true }
lasso = { version = "0.7", optional = true, features = ["multi-threaded"] }
paracord = { version = "0.1", optional = true }
phf = { version = "0.13.1", optional = true }

[dev-dependencies]
fake = "4.3.0"
divan = "0.1.14"
prometheus = { version = "0.14.0", default-features = false }
metrics = "0.24.2"
metrics-exporter-prometheus = { version = "0.17.2", default-features = false }
prometheus-client = "0.24.0"
rand = { version = "0.9.2", features = ["small_rng"] }
phf = { version = "0.13.1", features = ["macros"] }
ahash = "0.8"

[[bench]]
name = "counters"
harness = false
required-features = ["lasso"]

[[bench]]
name = "histograms"
harness = false
required-features = ["lasso"]

[[bench]]
name = "memory"
harness = false
required-features = ["paracord"]

[[bench]]
name = "high_cardinality"
harness = false
required-features = ["lasso", "paracord"]

[[bench]]
name = "encoding"
harness = false
required-features = ["paracord"]

# Properly document all features on docs.rs
[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
