Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion crates/bencher_compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "codspeed-bencher-compat"
version = "4.7.0"
rust-version = "1.80" # MSRV
rust-version = "1.85" # MSRV
edition = "2021"
description = "Bencher compatibility layer for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
2 changes: 1 addition & 1 deletion crates/cargo-codspeed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "cargo-codspeed"
version = "4.7.0"
rust-version = "1.80" # MSRV
rust-version = "1.85" # MSRV
edition = "2021"
description = "Cargo extension to build & run your codspeed benchmarks"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
4 changes: 2 additions & 2 deletions crates/codspeed/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "codspeed"
version = "4.7.0"
rust-version = "1.80" # MSRV
rust-version = "1.85" # MSRV
edition = "2021"
description = "Core instrumentation library for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand All @@ -23,7 +23,7 @@ colored = "3.0.0"
glob = "0.3.2"
libc = "^0.2"
nix = { version = "0.31.1", features = ["time"] }
getrandom = "0.2"
getrandom = "0.4"
serde = { workspace = true }
serde_json = { workspace = true }
statrs = { version = "0.18.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion crates/codspeed/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub fn is_perf_enabled() -> bool {
pub fn generate_unique_id() -> String {
// Generate random bytes for UUID v4
let mut bytes = [0u8; 16];
getrandom::getrandom(&mut bytes).expect("Failed to generate random bytes");
getrandom::fill(&mut bytes).expect("Failed to generate random bytes");

// Extract values from bytes
let r1 = u32::from_be_bytes([bytes[0], bytes[1], bytes[2], bytes[3]]);
Expand Down
2 changes: 1 addition & 1 deletion crates/criterion_compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "codspeed-criterion-compat"
version = "4.7.0"
rust-version = "1.80" # MSRV
rust-version = "1.85" # MSRV
edition = "2021"
description = "Criterion.rs compatibility layer for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ fn from_elem(c: &mut Criterion) {
for size in [KB, 2 * KB, 4 * KB, 8 * KB, 16 * KB].iter() {
group.throughput(Throughput::Bytes(*size as u64));
group.bench_with_input(BenchmarkId::from_parameter(size), size, |b, &size| {
b.iter(|| iter::repeat(0u8).take(size).collect::<Vec<_>>());
b.iter(|| iter::repeat_n(0u8, size).collect::<Vec<_>>());
});
}
group.finish();
Expand All @@ -18,7 +18,7 @@ fn from_elem(c: &mut Criterion) {
for size in [KB, 2 * KB].iter() {
group.throughput(Throughput::BytesDecimal(*size as u64));
group.bench_with_input(BenchmarkId::from_parameter(size), size, |b, &size| {
b.iter(|| iter::repeat(0u8).take(size).collect::<Vec<_>>());
b.iter(|| iter::repeat_n(0u8, size).collect::<Vec<_>>());
});
}
group.finish();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub fn line_comparison(
(x, y)
})
.collect();
tuples.sort_by(|&(ax, _), &(bx, _)| (ax.partial_cmp(&bx).unwrap_or(Ordering::Less)));
tuples.sort_by(|&(ax, _), &(bx, _)| ax.partial_cmp(&bx).unwrap_or(Ordering::Less));
let (xs, mut ys): (Vec<_>, Vec<_>) = tuples.into_iter().unzip();
formatter.scale_values(max, &mut ys);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ fn line_comparison_series_data<'a>(
(x, y)
})
.collect();
tuples.sort_by(|&(ax, _), &(bx, _)| (ax.partial_cmp(&bx).unwrap_or(Ordering::Less)));
tuples.sort_by(|&(ax, _), &(bx, _)| ax.partial_cmp(&bx).unwrap_or(Ordering::Less));
let function_name = key.as_ref();
let (xs, mut ys): (Vec<_>, Vec<_>) = tuples.into_iter().unzip();
formatter.scale_values(max, &mut ys);
Expand Down
2 changes: 1 addition & 1 deletion crates/criterion_compat/src/compat/criterion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl<M: Measurement> Criterion<M> {
}

#[track_caller]
pub fn benchmark_group<S: Into<String>>(&mut self, group_name: S) -> BenchmarkGroup<M> {
pub fn benchmark_group<S: Into<String>>(&mut self, group_name: S) -> BenchmarkGroup<'_, M> {
self.ensure_current_file();
BenchmarkGroup::<M>::new(self, group_name.into())
}
Expand Down
2 changes: 1 addition & 1 deletion crates/divan_compat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "codspeed-divan-compat"
version = "4.7.0"
rust-version = "1.80"
rust-version = "1.85"
edition = "2021"
description = "Divan compatibility layer for CodSpeed"
authors = ["Arthur Pastel <arthur@codspeed.io>"]
Expand Down
2 changes: 1 addition & 1 deletion crates/divan_compat/divan_fork/src/counter/any_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl AnyCounter {
&self,
duration: FineDuration,
bytes_format: BytesFormat,
) -> DisplayThroughput {
) -> DisplayThroughput<'_> {
DisplayThroughput { counter: self, picos: duration.picos as f64, bytes_format }
}

Expand Down
2 changes: 1 addition & 1 deletion crates/divan_compat/divan_fork/src/entry/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct EntryLocation {

impl EntryMeta {
#[inline]
pub(crate) fn bench_options(&self) -> Option<&BenchOptions> {
pub(crate) fn bench_options(&self) -> Option<&BenchOptions<'_>> {
self.bench_options.as_deref()
}

Expand Down
2 changes: 1 addition & 1 deletion crates/divan_compat/divan_fork/src/entry/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ impl<'a> EntryTree<'a> {
}
}

pub fn bench_options(&self) -> Option<&'a BenchOptions> {
pub fn bench_options(&self) -> Option<&'a BenchOptions<'_>> {
self.meta()?.bench_options()
}

Expand Down
2 changes: 1 addition & 1 deletion crates/divan_compat/divan_fork/tests/weird_usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use std::time::Duration;

extern crate codspeed_divan_compat_walltime as divan;
use divan::{Divan, __private::BENCH_ENTRIES};
use divan::{__private::BENCH_ENTRIES, Divan};

#[divan::bench(bytes_count = 0u8, chars_count = 0u16, cycles_count = 0u32, items_count = 0u64)]
fn zero_throughput() {}
Expand Down
3 changes: 2 additions & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[toolchain]
channel = "1.88"
channel = "1.96"
components = ["rustfmt", "clippy", "rust-analyzer"]
Loading