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:
Łukasz Magiera 2019-12-19 21:56:27 +01:00 committed by GitHub
commit 09cc1639c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,17 +222,18 @@ func main() {
verifySeal := time.Now()
if !c.Bool("skip-unseal") {
log.Info("Unsealing sector")
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
if err != nil {
return err
}
unseal := time.Now()
if err := rc.Close(); err != nil {
return err
}
}
unseal := time.Now()
sealTimings = append(sealTimings, SealingResult{
AddPiece: addpiece.Sub(start),