[package]
name = "tici_shard"
edition = "2024"

[features]
default = ["with_pd_client"]
bench = ["criterion", "tikv_alloc/jemalloc", "tikv_alloc/mem-profiling"]
profiling = []
testexport = []
with_pd_client = ["pd_client", "pd_security", "grpcio"]
get_manifest_from_writer = []

[dependencies]
anyhow = { workspace = true }
arrow = { workspace = true }
async-stream = { workspace = true }
async-trait = { workspace = true }
aws-config = { workspace = true }
aws-sdk-s3 = { workspace = true }
aws-types = { workspace = true }
backon = { workspace = true }
base64 = { workspace = true }
binary-heap-plus = { workspace = true }
bytes = { workspace = true }
chrono = { workspace = true }
criterion = { workspace = true, optional = true }
derive_more = { workspace = true }
fail = { workspace = true }
fake = { workspace = true }
flate2 = { workspace = true }
fs2 = { workspace = true }
futures = { workspace = true }
grpcio = { workspace = true, optional = true }
hex = { workspace = true }
intervaltree = { workspace = true }
itertools = { workspace = true }
lazy_static = { workspace = true }
libc = { workspace = true }
log = { workspace = true }
num-traits = { workspace = true }
num_cpus = { workspace = true }
once_cell = { workspace = true }
parking_lot = { workspace = true }
parquet = { workspace = true }
pd_client = { workspace = true, optional = true }
pd_security = { workspace = true, optional = true }
pprof = { workspace = true }
prometheus = { workspace = true }
prost = { workspace = true }
quick_cache = { workspace = true }
rand = { workspace = true }
redb = { workspace = true }
regex = { workspace = true }
scopeguard = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
static_assertions = { workspace = true }
storage_backend = { workspace = true }
sysinfo = { workspace = true }
tantivy = { workspace = true }
tantivy-common = { workspace = true }
tempfile = { workspace = true }
tici_common = { workspace = true }
tici_grpc = { workspace = true }
tici_service_discovery = { workspace = true }
tici_system = { workspace = true }
tikv_alloc = { workspace = true }
tipb = { workspace = true }
tokio = { workspace = true }
tokio-stream = { workspace = true }
tokio-util = { workspace = true }
toml = { workspace = true }
tonic = { workspace = true }
uuid = { workspace = true }
walkdir = { workspace = true }
zip = { workspace = true }

[build-dependencies]
prost-build = { workspace = true }
vergen-git2 = { workspace = true }

[dev-dependencies]
aws-config = { workspace = true }
criterion = { workspace = true }
tantivy = { workspace = true, features = ["failpoints"] }
tici_test_utils = { workspace = true }

[[bench]]
name = "bench_frag_writer"
harness = false
required-features = ["bench"]

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

[[bench]]
name = "bench_cdc_log_frag_writer"
harness = false
required-features = ["bench"]

[[bench]]
name = "bench_shard_reader"
harness = false
required-features = ["bench"]

[[bench]]
name = "bench_compactor"
harness = false
required-features = ["bench"]

[[bench]]
name = "bench_shard_reader_count"
harness = false
required-features = ["bench"]

[[bench]]
name = "bench_dedup_merge"
harness = false
required-features = ["bench"]

[[bench]]
name = "bench_dedup_obsolete_modes"
harness = false
required-features = ["bench"]
