chore: move benches to separate crate (#2028)

This allows the `benches` crate to depend on `tokio` with all feature
flags. This is a similar strategy used for `examples`.
This commit is contained in:
Carl Lerche
2019-12-24 20:53:20 -08:00
committed by GitHub
parent 67bf9c36f3
commit 50b91c0247
5 changed files with 20 additions and 5 deletions
+1
View File
@@ -8,6 +8,7 @@ members = [
"tokio-util",
# Internal
"benches",
"examples",
"tests-build",
"tests-integration",
+14
View File
@@ -0,0 +1,14 @@
[package]
name = "benches"
version = "0.0.0"
publish = false
edition = "2018"
[dependencies]
tokio = { version = "0.2.0", path = "../tokio", features = ["full"] }
bencher = "0.1.5"
[[bench]]
name = "spawn"
path = "spawn.rs"
harness = false
+5
View File
@@ -30,6 +30,11 @@ jobs:
displayName: ${{ crate }} - cargo test --all-features
workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
# Check benches
- script: cargo check --all-features --benches
displayName: ${{ crate }} - cargo check --benches
workingDirectory: $(Build.SourcesDirectory)/${{ crate }}
- template: azure-patch-crates.yml
- ${{ each crate in parameters.crates }}:
-5
View File
@@ -127,7 +127,6 @@ futures = { version = "0.3.0", features = ["async-await"] }
loom = { version = "0.2.13", features = ["futures", "checkpoint"] }
proptest = "0.9.4"
tempfile = "3.1.0"
bencher = "0.1.5"
[package.metadata.docs.rs]
all-features = true
@@ -135,7 +134,3 @@ rustdoc-args = ["--cfg", "docsrs"]
[package.metadata.playground]
features = ["full"]
[[bench]]
name = "spawn"
harness = false