15 #ifndef STXXL_IO_IOSTATS_HEADER
16 #define STXXL_IO_IOSTATS_HEADER
18 #ifndef STXXL_IO_STATS
19 #define STXXL_IO_STATS 1
108 stats::get_instance()->write_started(size);
110 stats::get_instance()->read_started(size);
122 stats::get_instance()->write_finished();
124 stats::get_instance()->read_finished();
158 stats::get_instance()->write_started(size);
169 stats::get_instance()->write_finished();
203 stats::get_instance()->read_started(size);
214 stats::get_instance()->read_finished();
223 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
230 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
245 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
248 stats::get_instance()->wait_started(wait_op);
255 #ifndef STXXL_DO_NOT_COUNT_WAIT_TIME
257 stats::get_instance()->wait_finished(wait_op);
290 return volume_written;
311 return c_volume_read;
318 return c_volume_written;
381 #ifndef STXXL_IO_STATS_RESET_FORBIDDEN
392 void write_finished();
396 void read_finished();
398 void wait_started(wait_op_type wait_op);
399 void wait_finished(wait_op_type wait_op);
403 inline void stats::write_started(
unsigned_type size_,
double now)
412 inline void stats::write_finished() { }
413 inline void stats::read_started(
unsigned_type size_,
double now)
422 inline void stats::read_finished() { }
424 #ifdef STXXL_DO_NOT_COUNT_WAIT_TIME
425 inline void stats::wait_started(wait_op_type) { }
426 inline void stats::wait_finished(wait_op_type) { }
465 reads(s.get_reads()),
466 writes(s.get_writes()),
467 volume_read(s.get_read_volume()),
468 volume_written(s.get_written_volume()),
469 c_reads(s.get_cached_reads()),
470 c_writes(s.get_cached_writes()),
471 c_volume_read(s.get_cached_read_volume()),
472 c_volume_written(s.get_cached_written_volume()),
473 t_reads(s.get_read_time()),
474 t_writes(s.get_write_time()),
475 p_reads(s.get_pread_time()),
476 p_writes(s.get_pwrite_time()),
477 p_ios(s.get_pio_time()),
478 t_wait(s.get_io_wait_time()),
479 t_wait_read(s.get_wait_read_time()),
480 t_wait_write(s.get_wait_write_time()),
481 elapsed(
timestamp() - s.get_last_reset_time())
547 return volume_written;
562 return c_volume_read;
567 return c_volume_written;
616 std::ostream&
operator << (std::ostream& o,
const stats_data& s);
640 #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.
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 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.
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
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
double get_write_time() const
Time that would be spent in write syscalls if all parallel writes were serialized.
double timestamp()
Returns number of seconds since the epoch, high resolution.
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)
double get_pwrite_time() const
choose_int_types< my_pointer_size >::unsigned_type unsigned_type
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
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