mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timer
log how long LoadExternalBlockFile() takes in ms (Benchmark)
This commit is contained in:
@@ -2146,6 +2146,8 @@ void PrintBlockTree()
|
||||
|
||||
bool LoadExternalBlockFile(FILE* fileIn)
|
||||
{
|
||||
int64 nStart = GetTimeMillis();
|
||||
|
||||
int nLoaded = 0;
|
||||
{
|
||||
LOCK(cs_main);
|
||||
@@ -2198,7 +2200,7 @@ bool LoadExternalBlockFile(FILE* fileIn)
|
||||
__PRETTY_FUNCTION__);
|
||||
}
|
||||
}
|
||||
printf("Loaded %i blocks from external file\n", nLoaded);
|
||||
printf("Loaded %i blocks from external file in %"PRI64d"ms\n", nLoaded, GetTimeMillis() - nStart);
|
||||
return nLoaded > 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user