Thrill  0.1

Detailed Description

Collects various I/O statistics.

Remarks
is a singleton

Definition at line 319 of file iostats.hpp.

+ Inheritance diagram for stats:
+ Collaboration diagram for stats:

#include <iostats.hpp>

Classes

class  scoped_wait_timer
 

Public Types

enum  wait_op_type { WAIT_OP_ANY, WAIT_OP_READ, WAIT_OP_WRITE }
 
- Public Types inherited from singleton< stats >
using instance_pointer = instance_type *
 
using instance_type = stats
 
using volatile_instance_pointer = volatile instance_pointer
 

Public Member Functions

file_statscreate_file_stats (unsigned device_id)
 
std::vector< file_stats_datadeepcopy_file_stats_data_list () const
 return list of file's stats data (deeply copied from each file_stats) More...
 
double get_creation_time () const
 
double get_io_wait_time () const
 
double get_pio_time () const
 
double get_pread_time () const
 
double get_pwrite_time () const
 
double get_wait_read_time () const
 
double get_wait_write_time () const
 
void wait_finished (wait_op_type wait_op_)
 
void wait_started (wait_op_type wait_op_)
 
- Public Member Functions inherited from singleton< stats >
 singleton ()=default
 
 singleton (const singleton &)=delete
 non-copyable: delete copy-constructor More...
 
singletonoperator= (const singleton &)=delete
 non-copyable: delete assignment operator More...
 

Private Member Functions

 stats ()
 private construction from singleton More...
 
void p_read_finished (double now)
 
void p_read_started (double now)
 
void p_write_finished (double now)
 
void p_write_started (double now)
 

Private Attributes

int acc_ios_
 
int acc_reads_
 
int acc_wait_read_
 
int acc_wait_write_
 
int acc_waits_
 
int acc_writes_
 
const double creation_time_
 
std::list< file_statsfile_stats_list_
 
std::mutex io_mutex_
 
std::mutex list_mutex_
 
double p_begin_io_
 
double p_begin_read_
 start time of parallel operation More...
 
double p_begin_wait_
 
double p_begin_wait_read_
 
double p_begin_wait_write_
 
double p_begin_write_
 
double p_ios_
 
double p_reads_
 seconds spent in parallel operations More...
 
double p_wait_read_
 
double p_wait_write_
 
double p_waits_
 
double p_writes_
 
std::mutex read_mutex_
 
double t_wait_read_
 
double t_wait_write_
 
double t_waits_
 
std::mutex wait_mutex_
 
std::mutex write_mutex_
 

Friends

std::ostream & operator<< (std::ostream &o, const stats &s)
 

Additional Inherited Members

- Static Public Member Functions inherited from singleton< stats >
static instance_pointer create_instance ()
 create instance of SubInstanceType and move into singleton More...
 
static void destroy_instance ()
 destroy singleton and mark as invalid More...
 
static instance_pointer get_instance ()
 return instance or create base instance if empty More...
 
static instance_typeget_ref ()
 

Member Enumeration Documentation

◆ wait_op_type

Enumerator
WAIT_OP_ANY 
WAIT_OP_READ 
WAIT_OP_WRITE 

Definition at line 364 of file iostats.hpp.

Constructor & Destructor Documentation

◆ stats()

stats ( )
private

private construction from singleton

Definition at line 196 of file iostats.cpp.

Member Function Documentation

◆ create_file_stats()

file_stats * create_file_stats ( unsigned  device_id)

create new instance of a file_stats for an io::file to collect statistics. (for internal library use.)

Definition at line 351 of file iostats.cpp.

References stats::file_stats_list_, and stats::list_mutex_.

◆ deepcopy_file_stats_data_list()

std::vector< file_stats_data > deepcopy_file_stats_data_list ( ) const

return list of file's stats data (deeply copied from each file_stats)

Definition at line 367 of file iostats.cpp.

References stats::file_stats_list_, and stats::list_mutex_.

◆ get_creation_time()

double get_creation_time ( ) const
inline

Definition at line 417 of file iostats.hpp.

◆ get_io_wait_time()

double get_io_wait_time ( ) const
inline

I/O wait time counter.

Returns
number of seconds spent in I/O waiting functions request::wait , wait_any and wait_all

Definition at line 429 of file iostats.hpp.

Referenced by stats_data::to_ostream().

◆ get_pio_time()

double get_pio_time ( ) const
inline

Period of time when at least one I/O thread was executing a read or a write.

Returns
seconds spent in I/O

Definition at line 460 of file iostats.hpp.

References foxxll::operator<<(), stats::wait_finished(), and stats::wait_started().

Referenced by stats_data::to_ostream().

◆ get_pread_time()

double get_pread_time ( ) const
inline

Period of time when at least one I/O thread was executing a read.

Returns
seconds spent in reading

Definition at line 446 of file iostats.hpp.

Referenced by stats_data::to_ostream().

◆ get_pwrite_time()

double get_pwrite_time ( ) const
inline

Period of time when at least one I/O thread was executing a write.

Returns
seconds spent in writing

Definition at line 453 of file iostats.hpp.

Referenced by stats_data::to_ostream().

◆ get_wait_read_time()

double get_wait_read_time ( ) const
inline

Definition at line 434 of file iostats.hpp.

Referenced by stats_data::to_ostream().

◆ get_wait_write_time()

double get_wait_write_time ( ) const
inline

Definition at line 439 of file iostats.hpp.

Referenced by stats_data::to_ostream().

◆ p_read_finished()

void p_read_finished ( double  now)
private

◆ p_read_started()

void p_read_started ( double  now)
private

◆ p_write_finished()

void p_write_finished ( double  now)
private

◆ p_write_started()

void p_write_started ( double  now)
private

◆ wait_finished()

◆ wait_started()

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  o,
const stats s 
)
friend

Definition at line 375 of file iostats.cpp.

Member Data Documentation

◆ acc_ios_

int acc_ios_
private

◆ acc_reads_

int acc_reads_
private

Definition at line 343 of file iostats.hpp.

Referenced by stats::p_read_finished(), and stats::p_read_started().

◆ acc_wait_read_

int acc_wait_read_
private

Definition at line 356 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ acc_wait_write_

int acc_wait_write_
private

Definition at line 356 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ acc_waits_

int acc_waits_
private

Definition at line 355 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ acc_writes_

int acc_writes_
private

Definition at line 343 of file iostats.hpp.

Referenced by stats::p_write_finished(), and stats::p_write_started().

◆ creation_time_

const double creation_time_
private

Definition at line 324 of file iostats.hpp.

◆ file_stats_list_

std::list<file_stats> file_stats_list_
private

need std::list here, because the io::file objects keep a pointer to the enclosed file_stats objects and this list may grow.

Definition at line 328 of file iostats.hpp.

Referenced by stats::create_file_stats(), and stats::deepcopy_file_stats_data_list().

◆ io_mutex_

std::mutex io_mutex_
private

◆ list_mutex_

std::mutex list_mutex_
mutableprivate

Definition at line 330 of file iostats.hpp.

Referenced by stats::create_file_stats(), and stats::deepcopy_file_stats_data_list().

◆ p_begin_io_

double p_begin_io_
private

◆ p_begin_read_

double p_begin_read_
private

start time of parallel operation

Definition at line 337 of file iostats.hpp.

Referenced by stats::p_read_finished(), and stats::p_read_started().

◆ p_begin_wait_

double p_begin_wait_
private

Definition at line 350 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_begin_wait_read_

double p_begin_wait_read_
private

Definition at line 352 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_begin_wait_write_

double p_begin_wait_write_
private

Definition at line 354 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_begin_write_

double p_begin_write_
private

Definition at line 337 of file iostats.hpp.

Referenced by stats::p_write_finished(), and stats::p_write_started().

◆ p_ios_

◆ p_reads_

double p_reads_
private

◆ p_wait_read_

double p_wait_read_
private

Definition at line 351 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_wait_write_

double p_wait_write_
private

Definition at line 353 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_waits_

double p_waits_
private

Definition at line 349 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ p_writes_

◆ read_mutex_

std::mutex read_mutex_
private

Definition at line 358 of file iostats.hpp.

Referenced by stats::p_read_finished(), and stats::p_read_started().

◆ t_wait_read_

◆ t_wait_write_

◆ t_waits_

double t_waits_
private

Definition at line 349 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ wait_mutex_

std::mutex wait_mutex_
private

Definition at line 358 of file iostats.hpp.

Referenced by stats::wait_finished(), and stats::wait_started().

◆ write_mutex_

std::mutex write_mutex_
private

Definition at line 358 of file iostats.hpp.

Referenced by stats::p_write_finished(), and stats::p_write_started().


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