def display_stats(stats, options=false, caption="stomp call summary")
options = @options unless options
if options[:verbose]
puts("\n---- #{caption} ----")
if stats[:discovered]
puts(" Nodes: #{stats[:discovered]} / #{stats[:responses]}")
else
puts(" Nodes: #{stats[:responses]}")
end
printf(" Start Time: %s\n", Time.at(stats[:starttime]))
printf(" Discovery Time: %.2fms\n", stats[:discoverytime] * 1000)
printf(" Agent Time: %.2fms\n", stats[:blocktime] * 1000)
printf(" Total Time: %.2fms\n", stats[:totaltime] * 1000)
else
if stats[:discovered]
printf("\nFinished processing %d / %d hosts in %.2f ms\n\n", stats[:responses], stats[:discovered], stats[:blocktime] * 1000)
else
printf("\nFinished processing %d hosts in %.2f ms\n\n", stats[:responses], stats[:blocktime] * 1000)
end
end
if stats[:noresponsefrom].size > 0
puts("\nNo response from:\n")
stats[:noresponsefrom].each do |c|
puts if c % 4 == 1
printf("%30s", c)
end
puts
end
end