diff --git a/triedb/pathdb/history_indexer.go b/triedb/pathdb/history_indexer.go index 08f6190dcb..3d3f2497b5 100644 --- a/triedb/pathdb/history_indexer.go +++ b/triedb/pathdb/history_indexer.go @@ -208,6 +208,8 @@ func (b *batchIndexer) finish(force bool) error { if err := eg.Wait(); err != nil { return err } + mtime := time.Now() + // Update the position of last indexed state history if !b.delete { storeIndexMetadata(batch, b.lastID) @@ -218,10 +220,14 @@ func (b *batchIndexer) finish(force bool) error { storeIndexMetadata(batch, b.lastID-1) } } + wtime := time.Now() if err := batch.Write(); err != nil { return err } - log.Debug("Committed batch indexer", "accounts", len(b.accounts), "storages", storages, "records", b.counter, "elapsed", common.PrettyDuration(time.Since(start))) + log.Debug("Committed batch indexer", "accounts", len(b.accounts), "storages", storages, "records", b.counter, "elapsed", common.PrettyDuration(time.Since(start)), + "mtime", common.PrettyDuration(mtime.Sub(start)), + "utime", common.PrettyDuration(wtime.Sub(mtime)), + "wtime", common.PrettyDuration(time.Since(wtime))) b.counter = 0 b.accounts = make(map[common.Hash][]uint64) b.storages = make(map[common.Hash]map[common.Hash][]uint64)