15 #ifndef STXXL_IO_IOSTATS_HEADER
16 #define STXXL_IO_IOSTATS_HEADER
18 #ifndef STXXL_IO_STATS
19 #define STXXL_IO_STATS 1
107 stats::get_instance()->write_started(size);
109 stats::get_instance()->read_started(size);
121 stats::get_instance()->write_finished();
123 stats::get_instance()->read_finished();
157 stats::get_instance()->write_started(size);
168 stats::get_instance()->write_finished();
202 stats::get_instance()->read_started(size);
213 stats::get_instance()->read_finished();
222 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
229 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
244 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
247 stats::get_instance()->wait_started(wait_op);
254 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
256 stats::get_instance()->wait_finished(wait_op);
289 return volume_written;
310 return c_volume_read;
317 return c_volume_written;
380 #ifndef STXXL_IO_STATS_RESET_FORBIDDEN
391 void write_finished();
395 void read_finished();
397 void wait_started(wait_op_type wait_op);
398 void wait_finished(wait_op_type wait_op);
402 inline void stats::write_started(
unsigned_type size_,
double now)
411 inline void stats::write_finished() { }
412 inline void stats::read_started(
unsigned_type size_,
double now)
421 inline void stats::read_finished() { }
423 #ifdef STXXL_DO_NOT_COUNT_WAIT_TIME
424 inline void stats::wait_started(wait_op_type) { }
425 inline void stats::wait_finished(wait_op_type) { }
471 : reads(s.get_reads()),
472 writes(s.get_writes()),
473 volume_read(s.get_read_volume()),
474 volume_written(s.get_written_volume()),
475 c_reads(s.get_cached_reads()),
476 c_writes(s.get_cached_writes()),
477 c_volume_read(s.get_cached_read_volume()),
478 c_volume_written(s.get_cached_written_volume()),
479 t_reads(s.get_read_time()),
480 t_writes(s.get_write_time()),
481 p_reads(s.get_pread_time()),
482 p_writes(s.get_pwrite_time()),
483 p_ios(s.get_pio_time()),
484 t_wait(s.get_io_wait_time()),
485 t_wait_read(s.get_wait_read_time()),
486 t_wait_write(s.get_wait_write_time()),
487 elapsed(
timestamp() - s.get_last_reset_time())
553 return volume_written;
568 return c_volume_read;
573 return c_volume_written;
622 std::ostream&
operator << (std::ostream& o,
const stats_data& s);
646 #endif // !STXXL_IO_IOSTATS_HEADER
int64 get_written_volume() const
double get_wait_write_time() const
double get_pio_time() const
int64 get_cached_read_volume() const
unsigned get_cached_writes() const
Returns total number of cached writes.
double get_last_reset_time() const
Return time of the last reset.
int64 c_volume_read
number of bytes read/written from/to cache
friend std::ostream & operator<<(std::ostream &os, const uint_pair &a)
make a uint_pair outputtable via iostreams, using unsigned long long.
unsigned get_reads() const
double t_wait
seconds spent waiting for completion of I/O operations
double get_read_time() const
Time that would be spent in read syscalls if all parallel reads were serialized.
int64 get_read_volume() const
Returns number of bytes read from disks.
unsigned long long int uint64
unsigned get_reads() const
Returns total number of reads.
double p_ios
seconds spent in all parallel I/O operations (read and write)
std::string format_with_SI_IEC_unit_multiplier(uint64 number, const char *unit="", int multiplier=1000)
double get_wait_read_time() const
double get_wait_read_time() const
double t_reads
seconds spent in operations
unsigned get_writes() const
Returns total number of writes.
int64 get_cached_written_volume() const
Returns number of bytes written to the cache.
#define STXXL_DEPRECATED(x)
stats_data(const stats &s)
unsigned get_cached_writes() const
void start(size_type size)
double get_wait_write_time() const
~scoped_read_write_timer()
double get_io_wait_time() const
unsigned reads
number of operations
double get_write_time() const
Time that would be spent in write syscalls if all parallel writes were serialized.
unsigned c_reads
number of cached operations
std::string add_IEC_binary_multiplier(uint64 number, const char *unit="")
double get_write_time() const
double get_pio_time() const
Period of time when at least one I/O thread was executing a read or a write.
Collects various I/O statistics.
#define STXXL_BEGIN_NAMESPACE
void STXXL_UNUSED(const U &)
scoped_read_write_timer(size_type size, bool is_write=false)
double p_begin_wait_write
unsigned get_writes() const
std::string add_SI_multiplier(uint64 number, const char *unit="")
unsigned get_cached_reads() const
double get_read_time() const
void start(size_type size)
int64 volume_read
number of bytes read/written
double get_pwrite_time() const
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
double timestamp()
Returns number of seconds since the epoch, high resolution.
double get_pwrite_time() const
Period of time when at least one I/O thread was executing a write.
int64 get_cached_written_volume() const
double p_reads
seconds spent in parallel operations
int64 get_read_volume() const
double get_elapsed_time() const
double get_io_wait_time() const
I/O wait time counter.
void start(size_type size)
double get_pread_time() const
Period of time when at least one I/O thread was executing a read.
int64 get_cached_read_volume() const
Returns number of bytes read from cache.
unsigned get_cached_reads() const
Returns total number of reads served from cache.
int64 get_written_volume() const
Returns number of bytes written to the disks.
double get_pread_time() const
#define STXXL_END_NAMESPACE