diff options
| author | Jeff Garzik <[email protected]> | 2012-05-17 17:21:01 -0700 |
|---|---|---|
| committer | Jeff Garzik <[email protected]> | 2012-05-17 17:21:01 -0700 |
| commit | 6c513a45d5a6751b466b7e1346a61e1f0ffbd250 (patch) | |
| tree | 9a6191ab578ac1cf4b151b3ef5c39a386052e1f5 /src/db.cpp | |
| parent | Revert "use _strnicmp (ISO C++) instead of deprecated strnicmp (POSIX) and ad... (diff) | |
| parent | Report how long DBFlush took. (diff) | |
| download | discoin-6c513a45d5a6751b466b7e1346a61e1f0ffbd250.tar.xz discoin-6c513a45d5a6751b466b7e1346a61e1f0ffbd250.zip | |
Merge pull request #1340 from rebroad/DBFlushDurationReport
Report how long DBFlush took.
Diffstat (limited to 'src/db.cpp')
| -rw-r--r-- | src/db.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/db.cpp b/src/db.cpp index 4c38873ee..cbcbd3faa 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; |