Hi,

I have received great help on this list, perhaps I can return the favor....

I have a script (attached) that gathers build times for all your jobs and
reports an average for the successful builds. If you use the Build Timeout
plugin, this is handy data you can use to set the timeout parameter
appropriately. You can get the same sort of info from the Trend screen for
each job but this does it programatically.

It works correctly on both my Hudson (v2.2.1) and Jenkins (v1.490)
installations.

To use it, change the $serverurl parameter to yours and run it:

   ruby getjobtimes2.rb

John

# ==========================================
# This utility
#  - gets a list of job times (averaged)
#  - reports the slowest jobs
#  - keep track of the job times in a DB
#  - works for both hudson and jenkins
#
# Use the data from this utility in the Build Timeout plugin.
#
# For example if the average job time is 10 minutes, set the
# Build Timeout  parameter to 10 * 150% = 15 minutes. If that
# job normally takes 10 minutes but for some reason it is
# taking 15 minutes for the current build then something is wrong
#  and so the plugin aborts the build.

Attachment: getjobtimes2.rb
Description: Binary data

Reply via email to