diff --git a/Cargo.toml b/Cargo.toml index 107537a5..736b0c94 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ name = "benchmarks" harness = false [dev-dependencies] -criterion = "0.2" +criterion = "0.3" rand = "0.6.1" doc-comment = "0.3" diff --git a/benches/benchmarks.rs b/benches/benchmarks.rs index e6ae3d20..475dfdb7 100644 --- a/benches/benchmarks.rs +++ b/benches/benchmarks.rs @@ -124,7 +124,7 @@ fn encode_benchmarks(byte_sizes: &[usize]) -> ParameterizedBenchmark { ParameterizedBenchmark::new("encode", do_encode_bench, byte_sizes.iter().cloned()) .warm_up_time(std::time::Duration::from_millis(500)) .measurement_time(std::time::Duration::from_secs(3)) - .throughput(|s| Throughput::Bytes(*s as u32)) + .throughput(|s| Throughput::Bytes(*s as u64)) .with_function("encode_display", do_encode_bench_display) .with_function("encode_reuse_buf", do_encode_bench_reuse_buf) .with_function("encode_slice", do_encode_bench_slice) @@ -135,7 +135,7 @@ fn decode_benchmarks(byte_sizes: &[usize]) -> ParameterizedBenchmark { ParameterizedBenchmark::new("decode", do_decode_bench, byte_sizes.iter().cloned()) .warm_up_time(std::time::Duration::from_millis(500)) .measurement_time(std::time::Duration::from_secs(3)) - .throughput(|s| Throughput::Bytes(*s as u32)) + .throughput(|s| Throughput::Bytes(*s as u64)) .with_function("decode_reuse_buf", do_decode_bench_reuse_buf) .with_function("decode_slice", do_decode_bench_slice) }