add a flag for bench to not run unseal
This commit is contained in:
parent
d2600ec46f
commit
83fb2eff98
@ -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,18 +222,19 @@ func main() {
|
|||||||
|
|
||||||
verifySeal := time.Now()
|
verifySeal := time.Now()
|
||||||
|
|
||||||
log.Info("Unsealing sector")
|
if !c.Bool("skip-unseal") {
|
||||||
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
log.Info("Unsealing sector")
|
||||||
if err != nil {
|
rc, err := sb.ReadPieceFromSealedSector(1, 0, dataSize, ticket.TicketBytes[:], commD[:])
|
||||||
return err
|
if err != nil {
|
||||||
}
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := rc.Close(); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
}
|
||||||
unseal := time.Now()
|
unseal := time.Now()
|
||||||
|
|
||||||
if err := rc.Close(); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
sealTimings = append(sealTimings, SealingResult{
|
sealTimings = append(sealTimings, SealingResult{
|
||||||
AddPiece: addpiece.Sub(start),
|
AddPiece: addpiece.Sub(start),
|
||||||
PreCommit: precommit.Sub(addpiece),
|
PreCommit: precommit.Sub(addpiece),
|
||||||
|
Loading…
Reference in New Issue
Block a user