:trkpts => "GPX trackpoints calls",
:web => "Web site traffic",
:other => "Other API calls"
-}
+}.freeze
def categorise_uri(line)
uri = line.split(" ")[1]
CALL_TYPES.keys.each do |type|
count = counts[type] || [0]
- avg = count.inject(0) { |a, e| a + e } / (1.0 * count.length)
+ avg = count.inject(0) { |acc, elem| acc + elem } / (1.0 * count.length)
puts "#{type}.value #{avg}"
end
end