summaryrefslogtreecommitdiff
path: root/innobase/os/os0file.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/os/os0file.c')
-rw-r--r--innobase/os/os0file.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c
index e40de2198c1..10bb9bb66d7 100644
--- a/innobase/os/os0file.c
+++ b/innobase/os/os0file.c
@@ -2486,7 +2486,7 @@ loop:
buf += sprintf(buf, "\n");
current_time = time(NULL);
- time_elapsed = difftime(current_time, os_last_printout);
+ time_elapsed = 0.001 + difftime(current_time, os_last_printout);
buf += sprintf(buf,
"Pending flushes (fsync) log: %lu; buffer pool: %lu\n",
@@ -2521,6 +2521,21 @@ loop:
}
/**************************************************************************
+Refreshes the statistics used to print per-second averages. */
+
+void
+os_aio_refresh_stats(void)
+/*======================*/
+{
+ os_n_file_reads_old = os_n_file_reads;
+ os_n_file_writes_old = os_n_file_writes;
+ os_n_fsyncs_old = os_n_fsyncs;
+ os_bytes_read_since_printout = 0;
+
+ os_last_printout = time(NULL);
+}
+
+/**************************************************************************
Checks that all slots in the system have been freed, that is, there are
no pending io operations. */