Public Types | Public Member Functions

stats Class Reference
[I/O primitives layer]

Collects various I/O statistics. More...

#include <iostats.h>

List of all members.

Public Types

enum  wait_op_type { WAIT_OP_ANY, WAIT_OP_READ, WAIT_OP_WRITE }

Public Member Functions

unsigned get_reads () const
 Returns total number of reads.
unsigned get_writes () const
 Returns total number of writes.
int64 get_read_volume () const
 Returns number of bytes read from disks.
int64 get_written_volume () const
 Returns number of bytes written to the disks.
unsigned get_cached_reads () const
 Returns total number of reads served from cache.
unsigned get_cached_writes () const
 Returns total number of cached writes.
int64 get_cached_read_volume () const
 Returns number of bytes read from cache.
int64 get_cached_written_volume () const
 Returns number of bytes written to the cache.
double get_read_time () const
 Time that would be spent in read syscalls if all parallel reads were serialized.
double get_write_time () const
 Time that would be spent in write syscalls if all parallel writes were serialized.
double get_pread_time () const
 Period of time when at least one I/O thread was executing a read.
double get_pwrite_time () const
 Period of time when at least one I/O thread was executing a write.
double get_pio_time () const
 Period of time when at least one I/O thread was executing a read or a write.
double get_io_wait_time () const
 I/O wait time counter.
double get_wait_read_time () const
double get_wait_write_time () const
double get_last_reset_time () const
 Return time of the last reset.
 _STXXL_DEPRECATED (void reset())
 Resets I/O time counters (including I/O wait counter).
 _STXXL_DEPRECATED (void _reset_io_wait_time())
 Resets I/O wait time counter.
void write_started (unsigned_type size_, double now=0.0)
void write_canceled (unsigned_type size_)
void write_finished ()
void write_cached (unsigned_type size_)
void read_started (unsigned_type size_, double now=0.0)
void read_canceled (unsigned_type size_)
void read_finished ()
void read_cached (unsigned_type size_)
void wait_started (wait_op_type wait_op)
void wait_finished (wait_op_type wait_op)

Detailed Description

Collects various I/O statistics.

Remarks:
is a singleton
Examples:

algo/test_parallel_sort.cpp.


Member Function Documentation

stats::_STXXL_DEPRECATED ( void   reset()  ) 

Resets I/O time counters (including I/O wait counter).

stats::_STXXL_DEPRECATED ( void   _reset_io_wait_time()  ) 

Resets I/O wait time counter.

int64 stats::get_cached_read_volume (  )  const [inline]

Returns number of bytes read from cache.

Returns:
number of bytes read from cache
unsigned stats::get_cached_reads (  )  const [inline]

Returns total number of reads served from cache.

Returns:
total number of cached reads
unsigned stats::get_cached_writes (  )  const [inline]

Returns total number of cached writes.

Returns:
total number of cached writes
int64 stats::get_cached_written_volume (  )  const [inline]

Returns number of bytes written to the cache.

Returns:
number of bytes written to cache
double stats::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
double stats::get_last_reset_time (  )  const [inline]

Return time of the last reset.

Returns:
seconds passed from the last reset()
double stats::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
double stats::get_pread_time (  )  const [inline]

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

Returns:
seconds spent in reading
double stats::get_pwrite_time (  )  const [inline]

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

Returns:
seconds spent in writing
double stats::get_read_time (  )  const [inline]

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

Returns:
seconds spent in reading
int64 stats::get_read_volume (  )  const [inline]

Returns number of bytes read from disks.

Returns:
number of bytes read
unsigned stats::get_reads (  )  const [inline]

Returns total number of reads.

Returns:
total number of reads
double stats::get_write_time (  )  const [inline]

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

Returns:
seconds spent in writing
unsigned stats::get_writes (  )  const [inline]

Returns total number of writes.

Returns:
total number of writes
int64 stats::get_written_volume (  )  const [inline]

Returns number of bytes written to the disks.

Returns:
number of bytes written

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