From 53d0e6dd6a434efe0b45f2df691f92db37958018 Mon Sep 17 00:00:00 2001 From: R E Broadley Date: Thu, 17 May 2012 21:44:20 +0100 Subject: [PATCH] Report how long DBFlush took. --- src/db.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/db.cpp b/src/db.cpp index 4c38873e..cbcbd3fa 100644 --- a/src/db.cpp +++ b/src/db.cpp @@ -289,6 +289,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip) void DBFlush(bool fShutdown) { + int64 nStart = GetTimeMillis(); // Flush log data to the actual data file // on all files that are not in use printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started"); @@ -318,6 +319,7 @@ void DBFlush(bool fShutdown) else mi++; } + printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart); if (fShutdown) { char** listp;