Skip to content

Commit

Permalink
update json format
Browse files Browse the repository at this point in the history
  • Loading branch information
deaswang authored and bibibong committed Jan 9, 2021
1 parent 84003ba commit be7a121
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmd/epik-bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import (
var log = logging.Logger("epik-bench")

type BenchResults struct {
EnvVar map[string]string

SectorSize abi.SectorSize
SectorNumber int

Expand Down Expand Up @@ -446,6 +448,15 @@ var sealBenchCmd = &cli.Command{
bo.VerifyWindowPostHot = verifyWindowpost2.Sub(verifyWindowpost1)
}

bo.EnvVar = make(map[string]string)
for _, envKey := range []string{"BELLMAN_NO_GPU", "FIL_PROOFS_MAXIMIZE_CACHING", "FIL_PROOFS_USE_GPU_COLUMN_BUILDER",
"FIL_PROOFS_USE_GPU_TREE_BUILDER", "FIL_PROOFS_USE_MULTICORE_SDR", "BELLMAN_CUSTOM_GPU"} {
envValue, found := os.LookupEnv(envKey)
if found {
bo.EnvVar[envKey] = envValue
}
}

if c.Bool("json-out") {
data, err := json.MarshalIndent(bo, "", " ")
if err != nil {
Expand All @@ -454,6 +465,10 @@ var sealBenchCmd = &cli.Command{

fmt.Println(string(data))
} else {
fmt.Println("environment variable list:")
for envKey, envValue := range bo.EnvVar {
fmt.Printf("%s=%s\n", envKey, envValue)
}
fmt.Printf("----\nresults (v28) SectorSize:(%d), SectorNumber:(%d)\n", sectorSize, sectorNumber)
if robench == "" {
fmt.Printf("seal: addPiece: %s (%s)\n", bo.SealingSum.AddPiece, bps(bo.SectorSize, bo.SectorNumber, bo.SealingSum.AddPiece))
Expand Down

0 comments on commit be7a121

Please sign in to comment.