bench: --num-sectors option

This commit is contained in:
Łukasz Magiera 2020-04-21 21:47:07 +02:00
parent 24c764c91e
commit eba0743d47

View File

@ -132,6 +132,10 @@ var sealBenchCmd = &cli.Command{
Name: "save-commit2-input", Name: "save-commit2-input",
Usage: "Save commit2 input to a file", Usage: "Save commit2 input to a file",
}, },
&cli.IntFlag{
Name: "num-sectors",
Value: 1,
},
}, },
Action: func(c *cli.Context) error { Action: func(c *cli.Context) error {
if c.Bool("no-gpu") { if c.Bool("no-gpu") {
@ -218,7 +222,7 @@ var sealBenchCmd = &cli.Command{
var sealTimings []SealingResult var sealTimings []SealingResult
var sealedSectors []abi.SectorInfo var sealedSectors []abi.SectorInfo
numSectors := abi.SectorNumber(1) numSectors := abi.SectorNumber(c.Int("num-sectors"))
for i := abi.SectorNumber(1); i <= numSectors && robench == ""; i++ { for i := abi.SectorNumber(1); i <= numSectors && robench == ""; i++ {
sid := abi.SectorID{ sid := abi.SectorID{
Miner: mid, Miner: mid,