aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-08-17 08:45:11 -0700
committerJeff Garzik <[email protected]>2012-08-17 08:45:11 -0700
commitdabb95b8926c4efce29101e0e95aa2e61638d440 (patch)
tree80783c4ca4f6ed389e256ad136d7f451febf57fd /src/main.cpp
parentMerge pull request #1679 from Diapolo/fix_sign_warning (diff)
parentlog how long LoadExternalBlockFile() takes in ms (Benchmark) (diff)
downloaddiscoin-dabb95b8926c4efce29101e0e95aa2e61638d440.tar.xz
discoin-dabb95b8926c4efce29101e0e95aa2e61638d440.zip
Merge pull request #1678 from Diapolo/LoadExternalBlockFile_add_timer
log how long LoadExternalBlockFile() takes in ms (Benchmark)
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 89f2709e6..550c10c37 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;
}