Print tables size during execution stage (#1479)

This commit is contained in:
Alex Sharov 2021-02-09 12:02:00 +07:00 committed by GitHub
parent 679d70fca8
commit 7464b7924d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -212,6 +212,9 @@ func SpawnExecuteBlocksStage(s *StageState, stateDB ethdb.Database, chainConfig
if err = tx.CommitAndBegin(context.Background()); err != nil {
return err
}
if err = printBucketsSize(tx.(ethdb.HasTx).Tx()); err != nil {
return err
}
chainContext.SetDB(tx)
}
}
@ -230,6 +233,9 @@ func SpawnExecuteBlocksStage(s *StageState, stateDB ethdb.Database, chainConfig
if err = tx.CommitAndBegin(context.Background()); err != nil {
return err
}
if err = printBucketsSize(tx.(ethdb.HasTx).Tx()); err != nil {
return err
}
chainContext.SetDB(tx)
}
start = time.Now()

View File

@ -671,10 +671,9 @@ func (tx *MdbxTx) printDebugInfo() {
"id", txInfo.Id,
"read_lag", txInfo.ReadLag,
"ro", tx.readOnly,
"space_used_mb", txInfo.SpaceUsed/1024/1024,
"space_retired_mb", txInfo.SpaceRetired/1024/1024,
//"space_retired_mb", txInfo.SpaceRetired/1024/1024,
"space_dirty_kb", txInfo.SpaceDirty/1024,
"callers", debug.Callers(8),
"callers", debug.Callers(7),
)
}
}