diff --git a/Cargo.toml b/Cargo.toml index cb5aebf..1325330 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ openssl = "0.10.38" parse_duration = "2.1.1" pin-project = "1.1" plotters = { version = "0.3", default-features = false, features = ["line_series", "svg_backend", "full_palette"]} -rand = "0.8" +rand = { version = "0.8", default-features = false, features = ["small_rng", "std"] } regex = "1.5" rune = "0.13" rust-embed = "8" diff --git a/src/workload.rs b/src/workload.rs index f83be76..080e9d6 100644 --- a/src/workload.rs +++ b/src/workload.rs @@ -7,7 +7,7 @@ use std::time::Instant; use hdrhistogram::Histogram; use rand::distributions::{Distribution, WeightedIndex}; -use rand::rngs::StdRng; +use rand::rngs::SmallRng; use rand::{Rng, SeedableRng}; use rune::alloc::clone::TryClone; use rune::compile::meta::Kind; @@ -482,7 +482,7 @@ impl Workload { /// Returns the cycle number and the end time of the query. pub async fn run(&self, cycle: i64) -> Result<(i64, Instant), LatteError> { let start_time = Instant::now(); - let mut rng = StdRng::seed_from_u64(cycle as u64); + let mut rng = SmallRng::seed_from_u64(cycle as u64); let context = SessionRef::new(&self.context); let result = self .program