Merge pull request #5005 from filecoin-project/feat/miner-slow-winpost-log

miner: log winningPoSt duration separately
This commit is contained in:
Łukasz Magiera 2020-11-26 11:25:02 +01:00 committed by GitHub
commit 1f9ca1958e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -423,6 +423,8 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
return nil, xerrors.Errorf("failed to compute winning post proof: %w", err)
}
tProof := build.Clock.Now()
// get pending messages early,
msgs, err := m.api.MpoolSelect(context.TODO(), base.TipSet.Key(), ticket.Quality())
if err != nil {
@ -451,7 +453,8 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg,
"tPowercheck ", tPowercheck.Sub(tDrand),
"tTicket ", tTicket.Sub(tPowercheck),
"tSeed ", tSeed.Sub(tTicket),
"tPending ", tPending.Sub(tSeed),
"tProof ", tProof.Sub(tSeed),
"tPending ", tPending.Sub(tProof),
"tCreateBlock ", tCreateBlock.Sub(tPending))
}