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

Detailed Description

Definition at line 45 of file iostats.hpp.

#include <iostats.hpp>

Classes

class  scoped_read_timer
 
class  scoped_read_write_timer
 
class  scoped_write_timer
 

Public Member Functions

 file_stats (unsigned int device_id)
 construct zero initialized More...
 
unsigned get_device_id () const
 
external_size_type get_read_bytes () const
 
unsigned get_read_count () const
 
double get_read_time () const
 
external_size_type get_write_bytes () const
 
unsigned get_write_count () const
 
double get_write_time () const
 
void read_canceled (const size_t size_)
 
void read_finished ()
 
void read_op_finished (const size_t size_, double duration)
 
void read_started (const size_t size_, double now=0.0)
 
void write_canceled (const size_t size_)
 
void write_finished ()
 
void write_op_finished (const size_t size_, double duration)
 
void write_started (const size_t size_, double now=0.0)
 

Private Attributes

int acc_reads_
 number of requests, participating in parallel operation More...
 
int acc_writes_
 
const unsigned device_id_
 associated device id More...
 
double p_begin_read_
 start time of parallel operation More...
 
double p_begin_write_
 
external_size_type read_bytes_
 number of bytes read/written More...
 
unsigned read_count_
 number of operations: read/write More...
 
std::mutex read_mutex_
 
double read_time_
 seconds spent in operations More...
 
external_size_type write_bytes_
 
unsigned write_count_
 
std::mutex write_mutex_
 
double write_time_
 

Constructor & Destructor Documentation

file_stats ( unsigned int  device_id)
explicit

construct zero initialized

Definition at line 35 of file iostats.cpp.

Member Function Documentation

unsigned get_device_id ( ) const
inline

Returns the device id.

Returns
device id

Definition at line 187 of file iostats.hpp.

References file_stats::device_id_.

external_size_type get_read_bytes ( ) const
inline

Returns number of bytes read from disks.

Returns
number of bytes read

Definition at line 208 of file iostats.hpp.

References file_stats::read_bytes_.

unsigned get_read_count ( ) const
inline

Returns total number of read_count_.

Returns
total number of read_count_

Definition at line 194 of file iostats.hpp.

References file_stats::read_count_.

double get_read_time ( ) const
inline

Time that would be spent in read syscalls if all parallel read_count_ were serialized.

Returns
seconds spent in reading

Definition at line 223 of file iostats.hpp.

References file_stats::read_time_.

external_size_type get_write_bytes ( ) const
inline

Returns number of bytes written to the disks.

Returns
number of bytes written

Definition at line 215 of file iostats.hpp.

References file_stats::write_bytes_.

unsigned get_write_count ( ) const
inline

Returns total number of write_count_.

Returns
total number of write_count_

Definition at line 201 of file iostats.hpp.

References file_stats::write_count_.

double get_write_time ( ) const
inline

Time that would be spent in write syscalls if all parallel write_count_ were serialized.

Returns
seconds spent in writing

Definition at line 231 of file iostats.hpp.

References file_stats::write_time_.

void read_canceled ( const size_t  size_)
void read_op_finished ( const size_t  size_,
double  duration 
)
void write_canceled ( const size_t  size_)
void write_op_finished ( const size_t  size_,
double  duration 
)

Member Data Documentation

int acc_reads_
private

number of requests, participating in parallel operation

Definition at line 60 of file iostats.hpp.

Referenced by file_stats::read_finished(), and file_stats::read_started().

int acc_writes_
private

Definition at line 60 of file iostats.hpp.

Referenced by file_stats::write_finished(), and file_stats::write_started().

const unsigned device_id_
private

associated device id

Definition at line 48 of file iostats.hpp.

Referenced by file_stats::get_device_id().

double p_begin_read_
private

start time of parallel operation

Definition at line 57 of file iostats.hpp.

Referenced by file_stats::read_finished(), and file_stats::read_started().

double p_begin_write_
private

Definition at line 57 of file iostats.hpp.

Referenced by file_stats::write_finished(), and file_stats::write_started().

external_size_type read_bytes_
private

number of bytes read/written

Definition at line 53 of file iostats.hpp.

Referenced by file_stats::get_read_bytes(), file_stats::read_canceled(), file_stats::read_op_finished(), and file_stats::read_started().

unsigned read_count_
private

number of operations: read/write

Definition at line 51 of file iostats.hpp.

Referenced by file_stats::get_read_count(), file_stats::read_canceled(), file_stats::read_op_finished(), and file_stats::read_started().

std::mutex read_mutex_
private
double read_time_
private

seconds spent in operations

Definition at line 55 of file iostats.hpp.

Referenced by file_stats::get_read_time(), file_stats::read_finished(), file_stats::read_op_finished(), and file_stats::read_started().

unsigned write_count_
private
std::mutex write_mutex_
private

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