1- use pprof2 :: { ProfilerGuard , ProfilerGuardBuilder } ;
1+ use pprof :: { ProfilerGuard , ProfilerGuardBuilder } ;
22use pyroscope:: {
33 backend:: {
44 Backend , BackendConfig , BackendImpl , BackendUninitialized , Report , Rule , Ruleset ,
@@ -82,10 +82,9 @@ impl Backend for Pprof<'_> {
8282 }
8383
8484 fn initialize ( & mut self ) -> Result < ( ) > {
85- // Construct a ProfilerGuardBuilder
86- let profiler = ProfilerGuardBuilder :: default ( ) . frequency ( self . config . sample_rate as i32 ) ;
85+ let profiler = ProfilerGuardBuilder :: default ( )
86+ . frequency ( self . config . sample_rate as i32 ) ;
8787
88- // Set inner_builder field
8988 * self . inner_builder . lock ( ) ? = Some ( profiler) ;
9089
9190 * self . guard . lock ( ) ? = Some (
@@ -199,8 +198,8 @@ impl From<StackBufferWrapper> for StackBuffer {
199198 }
200199}
201200
202- impl From < ( pprof2 :: Report , & BackendConfig ) > for StackBufferWrapper {
203- fn from ( arg : ( pprof2 :: Report , & BackendConfig ) ) -> Self {
201+ impl From < ( pprof :: Report , & BackendConfig ) > for StackBufferWrapper {
202+ fn from ( arg : ( pprof :: Report , & BackendConfig ) ) -> Self {
204203 let ( report, config) = arg;
205204 //convert report to stackbuffer
206205 let buffer_data: HashMap < StackTrace , usize > = report
@@ -225,8 +224,8 @@ impl From<StackTraceWrapper> for StackTrace {
225224 }
226225}
227226
228- impl From < ( pprof2 :: Frames , & BackendConfig ) > for StackTraceWrapper {
229- fn from ( arg : ( pprof2 :: Frames , & BackendConfig ) ) -> Self {
227+ impl From < ( pprof :: Frames , & BackendConfig ) > for StackTraceWrapper {
228+ fn from ( arg : ( pprof :: Frames , & BackendConfig ) ) -> Self {
230229 let ( frames, config) = arg;
231230 StackTraceWrapper ( StackTrace :: new (
232231 config,
@@ -251,8 +250,8 @@ impl From<StackFrameWrapper> for StackFrame {
251250 }
252251}
253252
254- impl From < pprof2 :: Symbol > for StackFrameWrapper {
255- fn from ( symbol : pprof2 :: Symbol ) -> Self {
253+ impl From < pprof :: Symbol > for StackFrameWrapper {
254+ fn from ( symbol : pprof :: Symbol ) -> Self {
256255 StackFrameWrapper ( StackFrame :: new (
257256 None ,
258257 Some ( symbol. name ( ) ) ,
0 commit comments