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",
|
Name: "json-out",
|
||||||
Usage: "output results in json format",
|
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 {
|
Action: func(c *cli.Context) error {
|
||||||
if c.Bool("no-gpu") {
|
if c.Bool("no-gpu") {
|
||||||
@ -218,17 +222,18 @@ func main() {
|
|||||||
|
|
||||||
verifySeal := time.Now()
|
verifySeal := time.Now()
|
||||||
|
|
||||||
|
if !c.Bool("skip-unseal") {
|
||||||
log.Info("Unsealing sector")
|
log.Info("Unsealing sector")
|
||||||
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
unseal := time.Now()
|
|
||||||
|
|
||||||
if err := rc.Close(); err != nil {
|
if err := rc.Close(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
unseal := time.Now()
|
||||||
|
|
||||||
sealTimings = append(sealTimings, SealingResult{
|
sealTimings = append(sealTimings, SealingResult{
|
||||||
AddPiece: addpiece.Sub(start),
|
AddPiece: addpiece.Sub(start),
|
||||||
|
Loading…
Reference in New Issue
Block a user