@@ -205,6 +205,7 @@ func (r *GatlingReconciler) gatlingRunnerReconcile(ctx context.Context, req ctrl
205
205
gatling .Status .Active = runnerJob .Status .Active
206
206
gatling .Status .Failed = runnerJob .Status .Failed
207
207
gatling .Status .Succeeded = runnerJob .Status .Succeeded
208
+ gatling .Status .RunnerCompletions = r .getRunnerCompletionsStatus (gatling )
208
209
gatling .Status .RunnerCompleted = false
209
210
gatling .Status .ReportCompleted = false
210
211
gatling .Status .NotificationCompleted = false
@@ -235,6 +236,7 @@ func (r *GatlingReconciler) gatlingRunnerReconcile(ctx context.Context, req ctrl
235
236
gatling .Status .Active = foundJob .Status .Active
236
237
gatling .Status .Failed = foundJob .Status .Failed
237
238
gatling .Status .Succeeded = foundJob .Status .Succeeded
239
+ gatling .Status .RunnerCompletions = r .getRunnerCompletionsStatus (gatling )
238
240
239
241
// Check if the job runs out of time in running the job
240
242
duration := utils .GetEpocTime () - gatling .Status .RunnerStartTime
@@ -838,10 +840,11 @@ func (r *GatlingReconciler) updateGatlingStatus(ctx context.Context, gatling *ga
838
840
}
839
841
840
842
func (r * GatlingReconciler ) dumpGatlingStatus (gatling * gatlingv1alpha1.Gatling , log logr.Logger ) {
841
- log .Info (fmt .Sprintf ("GatlingStatus: Active %d Succeeded %d Failed %d ReportCompleted %t NotificationCompleted %t ReportUrl %s Error %v" ,
843
+ log .Info (fmt .Sprintf ("GatlingStatus: Active %d Succeeded %d Failed %d RunnerCompletions %s ReportCompleted %t NotificationCompleted %t ReportUrl %s Error %v" ,
842
844
gatling .Status .Active ,
843
845
gatling .Status .Succeeded ,
844
846
gatling .Status .Failed ,
847
+ gatling .Status .RunnerCompletions ,
845
848
gatling .Status .ReportCompleted ,
846
849
gatling .Status .NotificationCompleted ,
847
850
gatling .Status .ReportUrl ,
@@ -1004,6 +1007,10 @@ func (r *GatlingReconciler) getGenerateLocalReport(gatling *gatlingv1alpha1.Gatl
1004
1007
return gatling .Spec .GenerateLocalReport
1005
1008
}
1006
1009
1010
+ func (r * GatlingReconciler ) getRunnerCompletionsStatus (gatling * gatlingv1alpha1.Gatling ) string {
1011
+ return fmt .Sprintf ("%d/%d" , gatling .Status .Succeeded , * (r .getGatlingRunnerJobParallelism (gatling )))
1012
+ }
1013
+
1007
1014
// SetupWithManager sets up the controller with the Manager.
1008
1015
func (r * GatlingReconciler ) SetupWithManager (mgr ctrl.Manager , options controller.Options ) error {
1009
1016
return ctrl .NewControllerManagedBy (mgr ).
0 commit comments