mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
Merge pull request #1340 from rebroad/DBFlushDurationReport
Report how long DBFlush took.
This commit is contained in:
commit
6c513a45d5
1 changed files with 2 additions and 0 deletions
|
@ -289,6 +289,7 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
|
||||||
|
|
||||||
void DBFlush(bool fShutdown)
|
void DBFlush(bool fShutdown)
|
||||||
{
|
{
|
||||||
|
int64 nStart = GetTimeMillis();
|
||||||
// Flush log data to the actual data file
|
// Flush log data to the actual data file
|
||||||
// on all files that are not in use
|
// on all files that are not in use
|
||||||
printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started");
|
printf("DBFlush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started");
|
||||||
|
@ -318,6 +319,7 @@ void DBFlush(bool fShutdown)
|
||||||
else
|
else
|
||||||
mi++;
|
mi++;
|
||||||
}
|
}
|
||||||
|
printf("DBFlush(%s)%s ended %15"PRI64d"ms\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " db not started", GetTimeMillis() - nStart);
|
||||||
if (fShutdown)
|
if (fShutdown)
|
||||||
{
|
{
|
||||||
char** listp;
|
char** listp;
|
||||||
|
|
Loading…
Add table
Reference in a new issue