File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
use criterion:: { criterion_group, criterion_main, Criterion } ;
2
2
use opentelemetry:: metrics:: noop:: NoopMeterProvider ;
3
+ #[ cfg( not( target_os = "windows" ) ) ]
4
+ use pprof:: criterion:: { Output , PProfProfiler } ;
3
5
use tracing_opentelemetry:: MetricsLayer ;
4
6
use tracing_subscriber:: { layer:: SubscriberExt , util:: SubscriberInitExt } ;
5
7
@@ -154,6 +156,13 @@ fn metrics_events(c: &mut Criterion) {
154
156
group. finish ( ) ;
155
157
}
156
158
159
+ #[ cfg( not( target_os = "windows" ) ) ]
160
+ criterion_group ! {
161
+ name = benches;
162
+ config = Criterion :: default ( ) . with_profiler( PProfProfiler :: new( 100 , Output :: Flamegraph ( None ) ) ) ;
163
+ targets = metrics_events
164
+ }
165
+ #[ cfg( target_os = "windows" ) ]
157
166
criterion_group ! {
158
167
name = benches;
159
168
config = Criterion :: default ( ) ;
You can’t perform that action at this time.
0 commit comments