aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-08-17 08:45:11 -0700
committerJeff Garzik <jgarzik@exmulti.com>2012-08-17 08:45:11 -0700
commitdabb95b8926c4efce29101e0e95aa2e61638d440 (patch)
tree80783c4ca4f6ed389e256ad136d7f451febf57fd /src
parent63046fcf62473d8c29b9df753ee1b7d649b0c405 (diff)
parent746f502a79e6797574099e94df1b63a6844917a9 (diff)
Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timer
log how long LoadExternalBlockFile() takes in ms (Benchmark)
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 89f2709e61..550c10c374 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -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;
}