Skip to content

Commit 45d34c0

Browse files
committed
benchmark: Add "unstable-testing" feature
We may sometimes need to benchmark / integration test some private stuff. There is no good way to do this. The least bad way seems to be to re-export such private APIs under an unstable feature, and mark tests or benchmarks that require them as depending on this feature. It's worth noting that using "required-features" cargo attribute won't automatically enable the feature - it will just prevent the target from existing unless the feature is enabled. It means that after this commit `cargo bench` won't run this benchmark. Instead you need to run "cargo bench --features unstable-testing" or "cargo bench --all-features".
1 parent b4a1655 commit 45d34c0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scylla/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ full-serialization = [
3939
"num-bigint-04",
4040
"bigdecimal-04",
4141
]
42+
unstable-testing = []
4243

4344
[dependencies]
4445
scylla-macros = { version = "0.7.0", path = "../scylla-macros" }
@@ -96,6 +97,7 @@ time = "0.3"
9697
[[bench]]
9798
name = "benchmark"
9899
harness = false
100+
required-features = ["unstable-testing"]
99101

100102
[lints.rust]
101103
unnameable_types = "warn"

0 commit comments

Comments
 (0)