fix(scheduler): remove the defer function cost
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
|||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
storagev1beta1 "k8s.io/api/storage/v1beta1"
|
||||||
"k8s.io/apimachinery/pkg/api/resource"
|
"k8s.io/apimachinery/pkg/api/resource"
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
@@ -409,6 +409,9 @@ func benchmarkScheduling(numNodes, numExistingPods, minPods int,
|
|||||||
// Since the total amount of time is relatively large, it might not be a concern.
|
// Since the total amount of time is relatively large, it might not be a concern.
|
||||||
time.Sleep(100 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: without this line we're taking the overhead of defer() into account.
|
||||||
|
b.StopTimer()
|
||||||
}
|
}
|
||||||
|
|
||||||
// makeBasePodWithSecrets creates a Pod object to be used as a template.
|
// makeBasePodWithSecrets creates a Pod object to be used as a template.
|
||||||
|
Reference in New Issue
Block a user