diff --git a/contrib/cmd/runkperf/commands/bench/node100_job1_pod3k.go b/contrib/cmd/runkperf/commands/bench/node100_job1_pod3k.go index e2d5bd0..394a439 100644 --- a/contrib/cmd/runkperf/commands/bench/node100_job1_pod3k.go +++ b/contrib/cmd/runkperf/commands/bench/node100_job1_pod3k.go @@ -43,6 +43,7 @@ func benchNode100Job1Pod3KCaseRun(cliCtx *cli.Context) (*internaltypes.Benchmark ctx := context.Background() kubeCfgPath := cliCtx.GlobalString("kubeconfig") + var rgSpec types.RunnerGroupSpec rgCfgFile, rgCfgFileDone, err := utils.NewLoadProfileFromEmbed( "loadprofile/node100_job1_pod3k.yaml", func(spec *types.RunnerGroupSpec) error { @@ -62,6 +63,8 @@ func benchNode100Job1Pod3KCaseRun(cliCtx *cli.Context) (*internaltypes.Benchmark data, _ := yaml.Marshal(spec) klog.V(2).InfoS("Load Profile", "config", string(data)) + + rgSpec = *spec return nil }, ) @@ -79,11 +82,12 @@ func benchNode100Job1Pod3KCaseRun(cliCtx *cli.Context) (*internaltypes.Benchmark var wg sync.WaitGroup wg.Add(1) + jobInterval := 5 * time.Second jobCtx, jobCancel := context.WithCancel(ctx) go func() { defer wg.Done() - utils.RepeatJobWith3KPod(jobCtx, kubeCfgPath, "job1pod3k", 5*time.Second) + utils.RepeatJobWith3KPod(jobCtx, kubeCfgPath, "job1pod3k", jobInterval) }() rgResult, derr := utils.DeployRunnerGroup(ctx, @@ -101,7 +105,11 @@ func benchNode100Job1Pod3KCaseRun(cliCtx *cli.Context) (*internaltypes.Benchmark } return &internaltypes.BenchmarkReport{ - RunnerGroupsReport: *rgResult, - Info: make(map[string]interface{}), + Description: fmt.Sprintf(` +Environment: 100 virtual nodes managed by kwok-controller, +Workload: Deploy 1 job with 3,000 pods repeatedly. The parallelism is 100. The interval is %v`, jobInterval), + LoadSpec: rgSpec, + Result: *rgResult, + Info: make(map[string]interface{}), }, nil } diff --git a/contrib/internal/types/report.go b/contrib/internal/types/report.go index 0667e4b..b636bc1 100644 --- a/contrib/internal/types/report.go +++ b/contrib/internal/types/report.go @@ -4,9 +4,14 @@ import apitypes "github.com/Azure/kperf/api/types" // BenchmarkReport represents runkperf-bench's result. type BenchmarkReport struct { - apitypes.RunnerGroupsReport + // Description describes test case. + Description string `json:"description" yaml:"description"` + // LoadSpec represents what the load profile looks like. + LoadSpec apitypes.RunnerGroupSpec `json:"loadSpec" yaml:"loadSpec"` + // Result represents runner group's report. + Result apitypes.RunnerGroupsReport `json:"result" yaml:"result"` // Info is additional information. // // FIXME(weifu): Use struct after finialized. - Info map[string]interface{} + Info map[string]interface{} `json:"info" yaml:"info"` }