summaryrefslogtreecommitdiff
path: root/innobase/log/log0log.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/log/log0log.c')
-rw-r--r--innobase/log/log0log.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/innobase/log/log0log.c b/innobase/log/log0log.c
index 644d53ac273..cb85e9d3ba6 100644
--- a/innobase/log/log0log.c
+++ b/innobase/log/log0log.c
@@ -3096,8 +3096,8 @@ log_print(
current_time = time(NULL);
- time_elapsed = difftime(current_time, log_sys->last_printout_time);
-
+ time_elapsed = 0.001 + difftime(current_time,
+ log_sys->last_printout_time);
buf += sprintf(buf,
"%lu pending log writes, %lu pending chkp writes\n"
"%lu log i/o's done, %.2f log i/o's/second\n",
@@ -3111,3 +3111,14 @@ log_print(
mutex_exit(&(log_sys->mutex));
}
+
+/**************************************************************************
+Refreshes the statistics used to print per-second averages. */
+
+void
+log_refresh_stats(void)
+/*===================*/
+{
+ log_sys->n_log_ios_old = log_sys->n_log_ios;
+ log_sys->last_printout_time = time(NULL);
+}