# HG changeset patch # User Jeff Garzik # Date 1337300461 25200 # Node ID 570374251dadc31c0fc5d642d5283fcf60be6a51 # Parent 146e2ce4a097c50eac0d773f331fdad8d1cb2f16# Parent d1152dd63333e29a97baf0586fc6b153bd3edd1c Merge pull request #1340 from rebroad/DBFlushDurationReport Report how long DBFlush took. diff --git a/src/db.cpp b/src/db.cpp --- a/src/db.cpp +++ b/src/db.cpp @@ -289,6 +289,7 @@ 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 @@ else mi++; } + printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart); if (fShutdown) { char** listp;