Skip to content

Commit 737b850

Browse files
committed
Fixed 0.6.0
1 parent dc680bf commit 737b850

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

benches/timers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ fn bench_duration_ops(c: &mut Criterion) {
4141
b.iter(|| {
4242
let mut d = Duration::from_nanos(1);
4343
for _ in 0..10_000 {
44-
d = d + Duration::from_nanos(1);
44+
d += Duration::from_nanos(1);
4545
d = d.saturating_sub(Duration::from_nanos(1));
4646
}
4747
criterion::black_box(d)

src/histogram.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ mod tests {
968968
assert_eq!(hist.percentile(1.0), Some(42));
969969
}
970970

971-
#[cfg_attr(not(feature = "perf-tests"), ignore)]
971+
#[cfg_attr(not(feature = "perf-tests"), ignore = "perf tests are opt-in; set PERF_TESTS=1 to enable")]
972972
#[test]
973973
fn test_performance_characteristics() {
974974
if !perf_enabled() {
@@ -1006,7 +1006,7 @@ mod tests {
10061006
);
10071007
}
10081008

1009-
#[cfg_attr(not(feature = "perf-tests"), ignore)]
1009+
#[cfg_attr(not(feature = "perf-tests"), ignore = "perf tests are opt-in; set PERF_TESTS=1 to enable")]
10101010
#[test]
10111011
fn test_memory_efficiency() {
10121012
// Test that histogram has reasonable memory footprint
@@ -1040,7 +1040,7 @@ mod benches {
10401040
std::env::var_os("PERF_TESTS").is_some()
10411041
}
10421042

1043-
#[cfg_attr(not(feature = "perf-tests"), ignore)]
1043+
#[cfg_attr(not(feature = "perf-tests"), ignore = "perf tests are opt-in; set PERF_TESTS=1 to enable")]
10441044
#[test]
10451045
fn bench_record_single_thread() {
10461046
if !perf_enabled() {
@@ -1066,7 +1066,7 @@ mod benches {
10661066
);
10671067
}
10681068

1069-
#[cfg_attr(not(feature = "perf-tests"), ignore)]
1069+
#[cfg_attr(not(feature = "perf-tests"), ignore = "perf tests are opt-in; set PERF_TESTS=1 to enable")]
10701070
#[test]
10711071
fn bench_record_multi_thread() {
10721072
if !perf_enabled() {
@@ -1108,7 +1108,7 @@ mod benches {
11081108
assert_eq!(hist.count(), total_ops);
11091109
}
11101110

1111-
#[cfg_attr(not(feature = "perf-tests"), ignore)]
1111+
#[cfg_attr(not(feature = "perf-tests"), ignore = "perf tests are opt-in; set PERF_TESTS=1 to enable")]
11121112
#[test]
11131113
fn bench_percentile_calculation() {
11141114
if !perf_enabled() {

0 commit comments

Comments
 (0)