383: def generate_report
384: @resourcemetrics[:failed] = @failures.find_all do |name, num|
385: num > 0
386: end.length
387:
388:
389: @timemetrics[:total] = @timemetrics.inject(0) do |total, vals|
390: total += vals[1]
391: total
392: end
393:
394:
395: @report.newmetric(:resources, @resourcemetrics)
396:
397:
398: @report.newmetric(:time, @timemetrics)
399:
400:
401: @report.newmetric(:changes,
402: :total => @changes.length
403: )
404:
405: @report.time = Time.now
406:
407: return @report
408: end