6 :map => "Map API calls",
7 :upload => "Changeset diff uploads",
8 :amf => "AMF API calls",
9 :history => "Element history fetches",
10 :full => "Full element fetches",
11 :trkpts => "GPX trackpoints calls",
12 :web => "Web site traffic",
13 :other => "Other API calls"
16 if ARGV[0] == "config"
17 puts "graph_title Requests processed"
18 puts "graph_args --base 1000"
19 puts "graph_vlabel Number of requests per ${graph_period}"
20 puts "graph_category api"
22 CALL_TYPES.each do |type, label|
23 puts "#{type}.label #{label}"
24 puts "#{type}.type DERIVE"
28 statistics = JSON.parse(File.read("/srv/www.openstreetmap.org/rails/tmp/statistics.json"))
30 CALL_TYPES.each_key do |type|
31 count = statistics["uri"][type.to_s] || 0
32 puts "#{type}.value #{count}"