Skip to content

Commit 860abbc

Browse files
committed
chore(sampling): add sampling types and benchmark for v04
1 parent a142a0e commit 860abbc

6 files changed

Lines changed: 1007 additions & 1 deletion

File tree

Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

benchmark/run_benchmarks_ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pushd "${PROJECT_DIR}" > /dev/null
2222

2323
# Run benchmarks
2424
message "Running benchmarks"
25-
cargo bench --workspace --features libdd-crashtracker/benchmarking -- --warm-up-time 1 --measurement-time 5 --sample-size=200
25+
cargo bench --workspace --features libdd-crashtracker/benchmarking,libdd-sampling/v04_span -- --warm-up-time 1 --measurement-time 5 --sample-size=200
2626
message "Finished running benchmarks"
2727

2828
# Copy the benchmark results to the output directory

libdd-sampling/Cargo.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,27 @@ license.workspace = true
1010
repository = "https://github.com/DataDog/libdatadog/tree/main/libdd-sampling"
1111
description = "Core sampling logic for Datadog tracing"
1212
authors.workspace = true
13+
autobenches = false
14+
15+
[lib]
16+
bench = false
17+
18+
[[bench]]
19+
name = "sampling_bench"
20+
harness = false
21+
path = "benches/sampling_bench.rs"
22+
required-features = ["v04_span"]
1323

1424
[dependencies]
1525
serde = { version = "1.0", features = ["derive"] }
1626
serde_json = "1.0"
1727
lru = "0.16.3"
28+
libdd-trace-utils = { path = "../libdd-trace-utils", optional = true }
29+
30+
[features]
31+
v04_span = ["dep:libdd-trace-utils"]
1832

1933
[dev-dependencies]
2034
criterion = "0.5"
35+
libdd-common = { path = "../libdd-common", features = ["bench-utils"] }
36+
libdd-trace-utils = { path = "../libdd-trace-utils" }

0 commit comments

Comments
 (0)