Sha256: c55894c1a89716dcbbe180d542a07b610b85cb567efeea0e7f530a21713fb7e2

Contents?: true

Size: 694 Bytes

Versions: 1

Compression:

Stored size: 694 Bytes

Contents

# Prints the total timespan found in the parsed log files.
puts
puts green("========================================================================")

if $summarizer.has_timestamps?
  puts "Timestamp first request: #{$summarizer.first_request_at}"
  puts "Timestamp last request:  #{$summarizer.last_request_at}" 
  puts "Total time analyzed: #{$summarizer.duration} days"
end

methods_print_array = []
methods_request_count = $summarizer.methods.inject(0) { |subtotal, (k, v)| subtotal + v }
$summarizer.methods.each do |key, value|
  methods_print_array << "%s (%0.01f%%)" % [key, green((value * 100) / methods_request_count.to_f)]
end
puts 'Methods: ' + methods_print_array.join(', ') + '.'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wvanbergen-request-log-analyzer-0.2.2 output/timespan.rb