mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 23:47:50 +00:00
Add apiserver profiling to our scalability tests
This commit is contained in:
@@ -96,10 +96,17 @@ var _ = SIGDescribe("Load capacity", func() {
|
||||
|
||||
testCaseBaseName := "load"
|
||||
var testPhaseDurations *timer.TestPhaseTimer
|
||||
var profileGathererStopCh chan struct{}
|
||||
|
||||
// Gathers metrics before teardown
|
||||
// TODO add flag that allows to skip cleanup on failure
|
||||
AfterEach(func() {
|
||||
// Stop apiserver CPU profile gatherer and gather memory allocations profile.
|
||||
close(profileGathererStopCh)
|
||||
wg := sync.WaitGroup{}
|
||||
framework.GatherApiserverMemoryProfile(&wg, "load")
|
||||
wg.Wait()
|
||||
|
||||
// Verify latency metrics
|
||||
highLatencyRequests, metrics, err := framework.HighLatencyRequests(clientset, nodeCount)
|
||||
framework.ExpectNoError(err)
|
||||
@@ -147,6 +154,10 @@ var _ = SIGDescribe("Load capacity", func() {
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
framework.ExpectNoError(framework.ResetMetrics(clientset))
|
||||
|
||||
// Start apiserver CPU profile gatherer with frequency based on cluster size.
|
||||
profileGatheringDelay := time.Duration(5+nodeCount/100) * time.Minute
|
||||
profileGathererStopCh = framework.StartApiserverCPUProfileGatherer(profileGatheringDelay)
|
||||
})
|
||||
|
||||
type Load struct {
|
||||
|
||||
Reference in New Issue
Block a user