Mercurial > hg > bitcoin
changeset 2603:570374251dad draft
Merge pull request #1340 from rebroad/DBFlushDurationReport
Report how long DBFlush took.
author | Jeff Garzik <jgarzik@exmulti.com> |
---|---|
date | Thu, 17 May 2012 17:21:01 -0700 |
parents | 146e2ce4a097 (current diff) d1152dd63333 (diff) |
children | 6c6b77fc21f5 |
files | |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;