File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
pyroscope_backends/pyroscope_pprofrs/src Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,12 @@ impl Default for PprofConfig {
3030}
3131
3232impl PprofConfig {
33+ /// Create a new Pprof configuration
3334 pub fn new ( ) -> Self {
3435 PprofConfig :: default ( )
3536 }
3637
38+ /// Set the sample rate
3739 pub fn sample_rate ( self , sample_rate : u32 ) -> Self {
3840 PprofConfig { sample_rate }
3941 }
@@ -61,6 +63,7 @@ impl std::fmt::Debug for Pprof<'_> {
6163}
6264
6365impl < ' a > Pprof < ' a > {
66+ /// Create a new Pprof Backend
6467 pub fn new ( config : PprofConfig ) -> Self {
6568 Pprof {
6669 buffer : Arc :: new ( Mutex :: new ( StackBuffer :: default ( ) ) ) ,
@@ -130,6 +133,7 @@ impl Backend for Pprof<'_> {
130133
131134 Ok ( ( ) )
132135 }
136+
133137 fn remove_rule ( & self , rule : Rule ) -> Result < ( ) > {
134138 if self . guard . lock ( ) ?. as_ref ( ) . is_some ( ) {
135139 self . dump_report ( ) ?;
@@ -142,6 +146,7 @@ impl Backend for Pprof<'_> {
142146}
143147
144148impl Pprof < ' _ > {
149+ /// Workaround for pprof-rs to interupt the profiler
145150 pub fn dump_report ( & self ) -> Result < ( ) > {
146151 let report = self
147152 . guard
You can’t perform that action at this time.
0 commit comments