Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
cswinter committed Apr 1, 2024
1 parent 62d0806 commit 9947869
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 562 deletions.
63 changes: 63 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

147 changes: 145 additions & 2 deletions locustdb-compression-utils/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions locustdb-compression-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ license-file = "../LICENSE"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
log = "0.4"
bitter = "0.6"
bitbuffer = "0.10"

[dev-dependencies]
clap = { version = "4", features = ["derive"] }
Expand Down
7 changes: 5 additions & 2 deletions locustdb-compression-utils/examples/gorilla_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ fn main() {
let opt = Opt::parse();

if let Some(mibibytes) = opt.benchmark {
assert!(!opt.single, "Benchmarking single precision is not supported");
assert!(opt.max_regret.len() == 1, "Benchmarking multiple max-regret values is not supported");
// create 1GiB of random floats
let len = (1 << 20) * mibibytes / 8;
Expand All @@ -59,7 +58,11 @@ fn main() {
let start_time = std::time::Instant::now();
let mut fast_rng = rand::rngs::SmallRng::seed_from_u64(42);
for _ in 0..len {
data.push(fast_rng.gen::<f64>());
if opt.single {
data.push(fast_rng.gen::<f32>() as f64);
} else {
data.push(fast_rng.gen::<f64>());
}
}
println!(
"Generated {mibibytes} MiB of random data in {:?}",
Expand Down
Loading

0 comments on commit 9947869

Please sign in to comment.