Trait Reporter

Source
pub trait Reporter: Debug {
    // Required method
    fn report<'life0, 'life1, 'async_trait>(
        &'life0 self,
        jfr: Vec<u8>,
        metadata: &'life1 ReportMetadata<'_>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Abstraction around reporting profiler data.

Required Methods§

Source

fn report<'life0, 'life1, 'async_trait>( &'life0 self, jfr: Vec<u8>, metadata: &'life1 ReportMetadata<'_>, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Takes a profiling sample, including JFR data and sample metadata, and uploads it towards a destination.

If this function returns an error, the sample will be dropped but profiling will continue, and this function will be called again for the next sample (or theoretically, a future version might have configuration that will an attempt to re-upload the current sample will be made - but today’s Profiler does not make any such attempts).

Implementors§