Skip to content

Commit

Permalink
make some dependencies optional with benches feature
Browse files Browse the repository at this point in the history
  • Loading branch information
dmolokanov committed Apr 30, 2020
1 parent 7e365b5 commit f14813b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mqtt/mqtt-broker/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ bincode = "1.2"
bytes = "0.5"
chrono = "0.4"
config = { version = "0.10", default-features = false, features = ["json"] }
criterion = { version = "0.3", optional = true }
crossbeam-channel = "0.4"
fail = "0.3"
flate2 = "1.0"
Expand All @@ -18,6 +19,7 @@ humantime = "2.0"
humantime-serde = "1.0"
lazy_static = "1.4"
native-tls = "0.2"
rand = { version = "0.7", optional = true }
regex = "1"
serde = { version = "1.0", features = ["derive", "rc"] }
thiserror = "1.0"
Expand All @@ -34,12 +36,10 @@ mqtt3 = { path = "../mqtt3", features = ["serde1"] }
[dev-dependencies]
atty = "0.2"
bytes = "0.5"
criterion = "0.3"
fail = { version = "0.3", features = ["failpoints"] }
itertools = "0.9"
matches = "0.1"
proptest = "0.9"
rand = "0.7"
serde_json = "1.0"
tempfile = "3"
test-case = "1.0"
Expand All @@ -53,6 +53,7 @@ required-features = ["fail/failpoints"]
[[bench]]
name = "persist_broker_state"
harness = false
required-features = ["tokio/rt-threaded"]

[[bench]]
name = "dispatch_messages"
Expand All @@ -62,6 +63,7 @@ required-features = ["__internal_broker_callbacks", "tokio/rt-threaded"]
[features]
default = []

benches = ["rand", "criterion", "__internal_broker_callbacks", "tokio/rt-threaded"]
# Internal (PRIVATE!) features used to aid testing.
# Don't rely on these whatsoever. They may disappear at anytime.

Expand Down

0 comments on commit f14813b

Please sign in to comment.