Merge pull request #990 from filecoin-project/feat/no-unseal-bench
add a flag for bench to not run unseal
This commit is contained in:
commit
09cc1639c9
@ -89,6 +89,10 @@ func main() {
|
||||
Name: "json-out",
|
||||
Usage: "output results in json format",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "skip-unseal",
|
||||
Usage: "skip the unseal portion of the benchmark",
|
||||
},
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
if c.Bool("no-gpu") {
|
||||
@ -218,18 +222,19 @@ func main() {
|
||||
|
||||
verifySeal := time.Now()
|
||||
|
||||
log.Info("Unsealing sector")
|
||||
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if !c.Bool("skip-unseal") {
|
||||
log.Info("Unsealing sector")
|
||||
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := rc.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
unseal := time.Now()
|
||||
|
||||
if err := rc.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
sealTimings = append(sealTimings, SealingResult{
|
||||
AddPiece: addpiece.Sub(start),
|
||||
PreCommit: precommit.Sub(addpiece),
|
||||
|
Loading…
Reference in New Issue
Block a user