Trait gbench::Writer[][src]

pub trait Writer {
    fn end(&self, data: &Vec<BenchData>);
}
Expand description

The trait that is implemented by all the writers

Examples

QueueLogger will log out to console all the collected data when program ends.

struct QueueLogger;
 
impl Writer for QueueLogger {
    fn end(&self, data: &Vec<BenchData>) {
        for data in data.iter() {
            println!("{:#?}", data);
        }
    }
}

Required methods

This method is called on all the collected data when program ends

Implementors