Skip to content

Commit

Permalink
Remove incorrect job duration message (kube-burner#313)
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 authored May 17, 2023
1 parent 3a812db commit bd21e0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions pkg/burner/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ func (ex *Executor) RunCreateJob(iterationStart, iterationEnd int) {
log.Fatal(err.Error())
}
}
start := time.Now().Round(time.Second)
// We have to sum 1 since the iterations start from 1
iterationProgress := (iterationEnd - iterationStart + 1) / 10
percent := 1
Expand Down Expand Up @@ -181,7 +180,6 @@ func (ex *Executor) RunCreateJob(iterationStart, iterationEnd int) {
}
wg.Wait()
}
log.Infof("Finished the create job in %v", time.Since(start).Round(time.Second))
}

// Simple integer division on the iteration allows us to batch iterations into
Expand Down
6 changes: 3 additions & 3 deletions pkg/burner/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,16 @@ func Run(configSpec config.Spec, uuid string, prometheusClients []*prometheus.Pr
jobList[jobPosition].End = time.Now().UTC()
prometheusJob.End = jobList[jobPosition].End
prometheusJob.JobConfig = job.Config
elapsedTime := prometheusJob.End.Sub(prometheusJob.Start).Seconds()
elapsedTime := prometheusJob.End.Sub(prometheusJob.Start).Round(time.Second)
// Don't append to Prometheus jobList when prometheus it's not initialized
if len(prometheusClients) > 0 {
prometheusJobList = append(prometheusJobList, prometheusJob)
}
log.Infof("Job %s took %.2f seconds", job.Config.Name, elapsedTime)
log.Infof("Job %s took %v", job.Config.Name, elapsedTime)
}
if globalConfig.IndexerConfig.Enabled {
for _, job := range jobList {
elapsedTime := job.End.Sub(job.Start).Seconds()
elapsedTime := job.End.Sub(job.Start).Round(time.Second).Seconds()
indexjobSummaryInfo(indexer, uuid, elapsedTime, job.Config, job.Start, metadata)
}
}
Expand Down

0 comments on commit bd21e0f

Please sign in to comment.