mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 07:27:21 +00:00
Merge pull request #117813 from pohly/scheduler-perf-test-runtime
scheduler-perf: measure workload runtime and relabel workloads
This commit is contained in:
@@ -769,6 +769,15 @@ func unrollWorkloadTemplate(b *testing.B, wt []op, w *workload) []op {
|
||||
}
|
||||
|
||||
func runWorkload(ctx context.Context, b *testing.B, tc *testCase, w *workload) []DataItem {
|
||||
start := time.Now()
|
||||
b.Cleanup(func() {
|
||||
duration := time.Now().Sub(start)
|
||||
// This includes startup and shutdown time and thus does not
|
||||
// reflect scheduling performance. It's useful to get a feeling
|
||||
// for how long each workload runs overall.
|
||||
b.ReportMetric(duration.Seconds(), "runtime_seconds")
|
||||
})
|
||||
|
||||
var cfg *config.KubeSchedulerConfiguration
|
||||
var err error
|
||||
if tc.SchedulerConfigPath != nil {
|
||||
|
||||
Reference in New Issue
Block a user