File tree Expand file tree Collapse file tree
crates/criterion_compat/src/compat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,16 +2,19 @@ use std::marker::PhantomData;
22use std:: { cell:: RefCell , rc:: Rc , time:: Duration } ;
33
44use codspeed:: { codspeed:: CodSpeed , utils:: get_git_relative_path} ;
5+ use criterion:: measurement:: WallTime ;
56use criterion:: { measurement:: Measurement , PlotConfiguration , SamplingMode , Throughput } ;
67
78use crate :: { Bencher , Criterion } ;
89
9- pub struct BenchmarkGroup < M : Measurement > {
10+ /// Deprecated: using the default measurement will be removed in the next major version.
11+ /// Defaulting to WallTime differs from the original BenchmarkGroup implementation but avoids creating a breaking change
12+ pub struct BenchmarkGroup < M : Measurement = WallTime > {
1013 codspeed : Rc < RefCell < CodSpeed > > ,
1114 current_file : String ,
1215 macro_group : String ,
1316 group_name : String ,
14- phantom : PhantomData < * const M > ,
17+ _marker : PhantomData < * const M > ,
1518}
1619
1720impl < M : Measurement > BenchmarkGroup < M > {
@@ -25,7 +28,7 @@ impl<M: Measurement> BenchmarkGroup<M> {
2528 current_file : criterion. current_file . clone ( ) ,
2629 macro_group : criterion. macro_group . clone ( ) ,
2730 group_name,
28- phantom : PhantomData ,
31+ _marker : PhantomData ,
2932 }
3033 }
3134
You can’t perform that action at this time.
0 commit comments