Skip to content

Commit

Permalink
Temporary fix : Skipping pvc metrics in stage
Browse files Browse the repository at this point in the history
  • Loading branch information
siddardh committed Jan 30, 2024
1 parent 31ae9ff commit fcb3573
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions cmd/loadTests.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,9 @@ func setup(cmd *cobra.Command, args []string) {
logData.PVCCreationSuccessCount = PVCCreationSuccessCount

averageWaitTimeForPVCProvisioning := float64(0)
averageWaitTimeForPVCProvisioning = sumDurationFromArray(PipelineRunWaitTimeForPVCSumPerThread).Seconds() / float64(PVCCreationSuccessCount)
if PVCCreationSuccessCount > 0 {
averageWaitTimeForPVCProvisioning = sumDurationFromArray(PipelineRunWaitTimeForPVCSumPerThread).Seconds() / float64(PVCCreationSuccessCount)
}
logData.AverageWaitTimeForPVCProvisioning = averageWaitTimeForPVCProvisioning

userCreationFailureRate := float64(userCreationFailureCount) / float64(overallCount)
Expand Down Expand Up @@ -744,7 +746,9 @@ func setup(cmd *cobra.Command, args []string) {
klog.Infof("Avg/max time to complete pipelinesrun: %.2f s/%.2f s", averageTimeToRunPipelineSucceeded, logData.MaxTimeToRunPipelineSucceeded)
klog.Infof("Avg/max time to complete integration test: %.2f s/%.2f s", IntegrationTestsAverageTimeToRunPipelineSucceeded, logData.IntegrationTestsMaxTimeToRunPipelineSucceeded)
klog.Infof("Avg/max time to complete deployment: %.2f s/%.2f s", averageTimeToDeploymentSucceeded, logData.MaxTimeToDeploymentSucceeded)
klog.Infof("Avg time to provision PVC : %.2f s", averageWaitTimeForPVCProvisioning)
if !stage {
klog.Infof("Avg time to provision PVC : %.2f s", averageWaitTimeForPVCProvisioning)
}

klog.Infof("Average time to fail pipelinerun: %.2f s", averageTimeToRunPipelineFailed)
klog.Infof("Average time to fail integration test: %.2f s", IntegrationTestsAverageTimeToRunPipelineFailed)
Expand Down Expand Up @@ -1594,7 +1598,10 @@ func (h *ConcreteHandlerPipelines) validatePipeline(ctx *JourneyContext, framewo
return false, nil
}
if pipelineRun.IsDone() {
h.handlePVCS(threadIndex, framework, pipelineRun)
// This PVC test could not work on stage because our test users are not admins and because as developers they don't have access to query for PVs
if !stage {
h.handlePVCS(threadIndex, framework, pipelineRun)
}
succeededCondition := pipelineRun.Status.GetCondition(apis.ConditionSucceeded)
if succeededCondition.IsFalse() {
dur := pipelineRun.Status.CompletionTime.Sub(pipelineRun.CreationTimestamp.Time)
Expand Down

0 comments on commit fcb3573

Please sign in to comment.