Skip to content

Commit

Permalink
core: add loadJournal time
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjunLi committed Apr 7, 2024
1 parent dc0cacd commit 239cdb1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion triedb/pathdb/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ type journalStorage struct {

// loadJournal tries to parse the layer journal from the disk.
func (db *Database) loadJournal(diskRoot common.Hash) (layer, error) {
start := time.Now()
r, err := db.diskdb.NewJournalReader()
defer db.diskdb.JournalClose()

Expand Down Expand Up @@ -110,7 +111,7 @@ func (db *Database) loadJournal(diskRoot common.Hash) (layer, error) {
if err != nil {
return nil, err
}
log.Info("Loaded layer journal", "diskroot", diskRoot, "diffhead", head.rootHash())
log.Info("Loaded layer journal", "diskroot", diskRoot, "diffhead", head.rootHash(), "elapsed", common.PrettyDuration(time.Since(start)))
return head, nil
}

Expand Down

0 comments on commit 239cdb1

Please sign in to comment.