Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62540

Negative build duration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • prometheus-plugin
    • None
    • Jenkins 2.222.4
      Prometheus-plugin 2.0.6

      The prometheus plugin reports negative build durations for some stages in our pipeline. We have a fairly complicated system though so it hard to determine how to reproduce these, but they continue to be an issue for us.

      default_jenkins_builds_stage_duration_milliseconds_summary_count{jenkins_job="org/repo/develop",repo="repo",stage="Build Installer",} 71.0
      default_jenkins_builds_stage_duration_milliseconds_summary_sum{jenkins_job="org/repo/develop",repo="repo",stage="Build Installer",} -8.26154386E9
      

      Here is a graph of this build stage's average duration:

      Using this query in grafana.

      sum by (stage) (default_jenkins_builds_stage_duration_milliseconds_summary_sum{service="$service", jenkins_job="org/$repo/$branch"})/ sum by (stage) (default_jenkins_builds_stage_duration_milliseconds_summary_count{service="$service", jenkins_job="org/$repo/$branch"})
      

            jequals5 Marky Jackson
            legonigel Nigel Armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: