stats Class Reference
[I/O primitives layer]

Collects various I/O statistics. More...

#include <iostats.h>

Inherits noncopyable.

Collaboration diagram for stats:

Collaboration graph
[legend]

List of all members.

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.
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_last_reset_time () const
 Return time of the last reset.
void reset ()
 Resets I/O time counters (including I/O wait counter).
void _reset_io_wait_time ()
 Resets I/O wait time counter.
double get_io_wait_time () const
 I/O wait time counter.
double increment_io_wait_time (double val)
 Increments I/O wait time counter.

Static Public Member Functions

static statsget_instance ()
 Call this function in order to access an instance of stats.


Detailed Description

Collects various I/O statistics.

Remarks:
is a singleton

Member Function Documentation

static stats* stats::get_instance (  )  [inline, static]

Call this function in order to access an instance of stats.

Returns:
pointer to an instance of stats

Referenced by stream::runs_creator< use_push< ValueType_ >, Cmp_, BlockSize_, AllocStr_ >::result(), and stream::runs_creator< Input_, Cmp_, BlockSize_, AllocStr_ >::result().

unsigned stats::get_reads (  )  const [inline]

Returns total number of reads.

Returns:
total number of reads

unsigned stats::get_writes (  )  const [inline]

Returns total number of writes.

Returns:
total number of writes

int64 stats::get_read_volume (  )  const [inline]

Returns number of bytes read from disks.

Returns:
number of bytes read

int64 stats::get_written_volume (  )  const [inline]

Returns number of bytes written to the disks.

Returns:
number of bytes written

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

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

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_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_last_reset_time (  )  const [inline]

Return time of the last reset.

Returns:
seconds passed from the last reset()

void stats::reset (  ) 

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

void stats::_reset_io_wait_time (  ) 

Resets I/O wait time counter.

double stats::get_io_wait_time (  )  const

I/O wait time counter.

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

number of seconds

double stats::increment_io_wait_time ( double  val  ) 

Increments I/O wait time counter.

Parameters:
val increment value in seconds
Returns:
new value of I/O wait time counter in seconds


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

Generated on Wed Apr 21 06:45:50 2010 for Stxxl by  doxygen 1.5.6