64 stream_size_type get_user(
size_t i);
65 void increment_user(
size_t i, stream_size_type delta);
69 typedef std::chrono::steady_clock clock;
70 typedef std::chrono::time_point<clock> time_point;
74 static ptime now() {
return clock::now();}
76 static double seconds(
const ptime & t1,
const ptime & t2) {
77 return std::chrono::duration_cast<std::chrono::duration<double>>(
78 t2.m_ptime - t1.m_ptime).count();
96 ptime t2 = ptime::now();
97 increment_user(i, (stream_size_type)(ptime::seconds(t1, t2)*1000000));
106 #endif //_TPIE_STATS_H
void increment_bytes_written(stream_size_type delta)
Inform the stats module that an additional delta bytes have been written to disk. ...
stream_size_type get_bytes_read()
Return the number of bytes read from disk since program start.
stream_size_type get_temp_file_usage()
Return the number of bytes currently being used by temporary files.
void increment_bytes_read(stream_size_type delta)
Inform that stats module that an additional delta bytes have been read from disk. ...
void increment_temp_file_usage(stream_offset_type delta)
Increment (possibly by a negative amount) the number of bytes being used by temporary files...
stream_size_type get_bytes_written()
Return the number of bytes written to disk since program start.