In your place I would write a small plugin implementing a http://javadoc.jenkins-ci.org/hudson/model/queue/QueueListener.html class to record time when builds enter and leave the queue.
Cheers Le 29 mai 2015 4:16 PM, "Daniel Weber" <[email protected]> a écrit : > Hi all, > > I was trying to write a small Groovy script that determines queue > times for builds. But somehow the results do > not match my observations. I definitively know that some builds had to > wait for > 10 minutes before an executor > was free. But the script only shows queue times of less than a second. > Here's the script: > > jenkins.model.Jenkins jenkins = jenkins.model.Jenkins.instance > for (p in jenkins.projects) { > for (b in p.builds) { > long start = b.startTimeInMillis > long scheduled = b.timeInMillis > queueTime = start - scheduled > println (p.name + " (" + b + ") : " + queueTime + "ms") > } > } > > I assumed startTimeMillis is the time when the build was actually > starting to run and timeInMillis is the time when > it was scheduled and entered the queue. Does this make sense? > > Any feedback is appreciated :) > Thanks in advance, > Daniel > > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/CA%2Bj7gMTZSC0gw1L3MiMOr45h_5brbKyVRK_tneEQ9hLqd4zWAQ%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CANWgJS6g8VeyKGEdWYnAeydn0-zY714K6NbRuaLG86jHc7%2Bb1g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
