Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
scoped_print_iostats Class Reference

Detailed Description

Simple scoped iostats reporter which takes a message and reports the relative IO performance on destruction.

Definition at line 660 of file iostats.hpp.

+ Collaboration diagram for scoped_print_iostats:

#include <iostats.hpp>

Public Member Functions

 scoped_print_iostats (const std::string &message, const std::string key, uint64_t bytes)
 Start time and configure report-style. More...
 
 scoped_print_iostats (const std::string &message, uint64_t bytes=0)
 
 scoped_print_iostats (uint64_t bytes=0)
 
 ~scoped_print_iostats ()
 on destruction: report stats More...
 
void final_report ()
 Same as report() but disables reporting on destruction. More...
 
const foxxll::stats_datainitial_stats () const
 stats at initialization More...
 
void report () const
 print out relative stats via LOG More...
 

Protected Attributes

foxxll::stats_data begin_
 initial io-stats More...
 
uint64_t bytes_
 bytes processed More...
 
std::string key_
 
std::string message_
 message More...
 
bool report_on_destruction_
 report on destruction More...
 

Constructor & Destructor Documentation

scoped_print_iostats ( const std::string &  message,
const std::string  key,
uint64_t  bytes 
)
inline

Start time and configure report-style.

Parameters
messageDescription displayed on the first line of the report
keyLine prefix displayed at the beginning of every line but the first
bytesUsed to compute MB/s as an initial overview

Definition at line 684 of file iostats.hpp.

References TLX_LOG1.

scoped_print_iostats ( const std::string &  message,
uint64_t  bytes = 0 
)
inlineexplicit

Definition at line 694 of file iostats.hpp.

scoped_print_iostats ( uint64_t  bytes = 0)
inlineexplicit

Definition at line 698 of file iostats.hpp.

~scoped_print_iostats ( )
inline

on destruction: report stats

Definition at line 719 of file iostats.hpp.

References scoped_print_iostats::report(), and scoped_print_iostats::report_on_destruction_.

Member Function Documentation

void final_report ( )
inline

Same as report() but disables reporting on destruction.

Definition at line 712 of file iostats.hpp.

References scoped_print_iostats::report(), and scoped_print_iostats::report_on_destruction_.

const foxxll::stats_data& initial_stats ( ) const
inline

stats at initialization

Definition at line 703 of file iostats.hpp.

References scoped_print_iostats::begin_.

Member Data Documentation

foxxll::stats_data begin_
protected

initial io-stats

Definition at line 668 of file iostats.hpp.

Referenced by scoped_print_iostats::initial_stats(), and scoped_print_iostats::report().

uint64_t bytes_
protected

bytes processed

Definition at line 671 of file iostats.hpp.

Referenced by scoped_print_iostats::report().

std::string key_
protected

Definition at line 665 of file iostats.hpp.

Referenced by scoped_print_iostats::report().

std::string message_
protected

message

Definition at line 664 of file iostats.hpp.

Referenced by scoped_print_iostats::report().

bool report_on_destruction_
protected

report on destruction

Definition at line 674 of file iostats.hpp.

Referenced by scoped_print_iostats::final_report(), and scoped_print_iostats::~scoped_print_iostats().


The documentation for this class was generated from the following files: