🎨 Clean code

This commit is contained in:
Liang Ding 2023-01-16 13:50:02 +08:00
parent 607b1571b6
commit a0143b2637
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -386,6 +386,7 @@ func InitBlockTree(force bool) {
}
blockTreesLock.Unlock()
debug.FreeOSMemory()
if elapsed := time.Since(start).Seconds(); 2 < elapsed {
logging.LogWarnf("read block tree [%s] to [%s], elapsed [%.2fs]", humanize.Bytes(uint64(len(data))), util.BlockTreePath, elapsed)
}
@ -414,6 +415,7 @@ func SaveBlockTree(force bool) {
return
}
debug.FreeOSMemory()
if elapsed := time.Since(start).Seconds(); 2 < elapsed {
logging.LogWarnf("save block tree [size=%s] to [%s], elapsed [%.2fs]", humanize.Bytes(uint64(len(data))), util.BlockTreePath, elapsed)
}