[package]
name = "tiny-counter"
version = "0.1.0"
edition = "2021"
rust-version = "1.71"
description = "Track event counts across time windows with fixed memory and fast queries"
license = "MIT OR Apache-2.0"
repository = "https://github.com/jhugman/tiny-counter"
documentation = "https://docs.rs/tiny-counter"
homepage = "https://github.com/jhugman/tiny-counter"
keywords = ["analytics", "metrics", "counter", "rate-limiting", "telemetry"]
categories = ["data-structures", "algorithms"]
[dependencies]
chrono = "0.4"
dashmap = "6.0"
thiserror = "1.0"
bincode = { version = "1.3", optional = true }
rusqlite = { version = "0.31", optional = true }
serde = { version = "1.0", optional = true, features = ["derive"] }
serde_json = { version = "1.0", optional = true }
tokio = { version = "1.0", features = ["rt", "time"], optional = true }
[dev-dependencies]
tempfile = "3.8"
tokio = { version = "1.0", features = ["rt", "time", "macros"] }
proptest = "1.4"
criterion = "0.5"
[features]
default = ["storage-fs", "serde-bincode", "calendar"]
calendar = []
serde = ["dep:serde", "chrono/serde"]
storage-fs = []
storage-sqlite = ["dep:rusqlite"]
serde-bincode = ["serde", "dep:bincode"]
serde-json = ["serde", "dep:serde_json"]
tokio = ["dep:tokio"]
[[bench]]
name = "startup_and_convert"
harness = false
[[bench]]
name = "calendar"
harness = false
[[test]]
name = "storage"
path = "tests/storage/mod.rs"
[[test]]
name = "query"
path = "tests/query/mod.rs"
[[test]]
name = "limits"
path = "tests/limits/mod.rs"
[[test]]
name = "config"
path = "tests/config/mod.rs"
[[test]]
name = "recording"
path = "tests/recording/mod.rs"
[[test]]
name = "workflow"
path = "tests/workflow/mod.rs"
[[test]]
name = "concurrency"
path = "tests/concurrency/mod.rs"
[[test]]
name = "performance"
path = "tests/performance/mod.rs"
[[test]]
name = "properties"
path = "tests/properties/mod.rs"