aboutsummaryrefslogtreecommitdiff
path: root/src/db.cpp
diff options
context:
space:
mode:
authorR E Broadley <rebroad+github@gmail.com>2012-05-17 21:44:20 +0100
committerR E Broadley <rebroad+github@gmail.com>2012-05-17 22:56:14 +0100
commit53d0e6dd6a434efe0b45f2df691f92db37958018 (patch)
treea115ef9993252d44d74300871dc50b348a7bbc76 /src/db.cpp
parentf1e7570755587e37c60cf652a398fafe40eb3008 (diff)
Report how long DBFlush took.
Diffstat (limited to 'src/db.cpp')
-rw-r--r--src/db.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 4c38873eed..cbcbd3faa0 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;