Thrill  0.1

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() [1/3]

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() [2/3]

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

Definition at line 694 of file iostats.hpp.

◆ scoped_print_iostats() [3/3]

scoped_print_iostats ( uint64_t  bytes = 0)
inlineexplicit

Definition at line 698 of file iostats.hpp.

◆ ~scoped_print_iostats()

~scoped_print_iostats ( )
inline

on destruction: report stats

Definition at line 719 of file iostats.hpp.

Member Function Documentation

◆ final_report()

void final_report ( )
inline

Same as report() but disables reporting on destruction.

Definition at line 712 of file iostats.hpp.

◆ initial_stats()

const foxxll::stats_data& initial_stats ( ) const
inline

stats at initialization

Definition at line 703 of file iostats.hpp.

◆ report()

void report ( ) const

print out relative stats via LOG

Definition at line 813 of file iostats.cpp.

References tlx::format_iec_units(), stats_data::get_elapsed_time(), singleton< stats >::get_instance(), and TLX_LOG1.

Member Data Documentation

◆ begin_

foxxll::stats_data begin_
protected

initial io-stats

Definition at line 668 of file iostats.hpp.

◆ bytes_

uint64_t bytes_
protected

bytes processed

Definition at line 671 of file iostats.hpp.

◆ key_

std::string key_
protected

Definition at line 665 of file iostats.hpp.

◆ message_

std::string message_
protected

message

Definition at line 664 of file iostats.hpp.

◆ report_on_destruction_

bool report_on_destruction_
protected

report on destruction

Definition at line 674 of file iostats.hpp.


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