Skip to content

Commit

Permalink
Pause before sending metadata
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Mar 24, 2021
1 parent 3b8b3a1 commit c45a8ad
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmd/kube-burner/kube-burner.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,17 +288,15 @@ func steps(uuid string, p *prometheus.Prometheus, alertM *alerting.AlertManager)
case config.DeletionJob:
job.RunDeleteJob()
}

if job.Config.JobPause > 0 {
log.Infof("Pausing for %v before finishing job", job.Config.JobPause)
time.Sleep(job.Config.JobPause)
}
elapsedTime := time.Now().UTC().Sub(jobList[jobPosition].Start).Seconds()
log.Infof("Job %s took %.2f seconds", job.Config.Name, elapsedTime)
if config.ConfigSpec.GlobalConfig.IndexerConfig.Enabled {
burner.IndexMetadataInfo(indexer, uuid, elapsedTime, job.Config, jobList[jobPosition].Start)
}
if job.Config.JobPause > 0 {
log.Infof("Pausing for %v before next job", job.Config.JobPause)
time.Sleep(job.Config.JobPause)
}
jobList[jobPosition].End = time.Now().UTC()
}
if p != nil {
log.Infof("Waiting %v extra before scraping prometheus", p.Step*2)
Expand Down

0 comments on commit c45a8ad

Please sign in to comment.