diff options
author | Jochen Topf <jochen@topf.org> | 2010-11-06 16:13:39 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2010-11-06 16:13:39 +0100 |
commit | 08f5fc6f39402873942051dbbd068c6f69766c9d (patch) | |
tree | c3a467b5b6a47e4642890899f7c65c21778362fc /web/taginfo.rb | |
parent | f58d0baf67458a504dfeb1b7277434e2ad062179 (diff) | |
download | taginfo-08f5fc6f39402873942051dbbd068c6f69766c9d.tar taginfo-08f5fc6f39402873942051dbbd068c6f69766c9d.tar.gz |
Begin of stats refactoring
Diffstat (limited to 'web/taginfo.rb')
-rwxr-xr-x | web/taginfo.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/taginfo.rb b/web/taginfo.rb index 81a2b6e..6ff55ab 100755 --- a/web/taginfo.rb +++ b/web/taginfo.rb @@ -72,8 +72,8 @@ class Taginfo < Sinatra::Base @stats[row[0]] = row[1].to_i end - @stats['objects'] = @stats['nodes'] + @stats['ways'] + @stats['relations'] - @stats['object_tags'] = @stats['node_tags'] + @stats['way_tags'] + @stats['relation_tags'] + @stats['objects'] = @stats['nodes'] + @stats['ways'] + @stats['relations'] # XXX to be removed + @stats['object_tags'] = @stats['node_tags'] + @stats['way_tags'] + @stats['relation_tags'] # XXX to be removed @stats['nodes_with_tags_percent'] = (10000.0 * @stats['nodes_with_tags'] / @stats['nodes']).to_i.to_f / 100 @stats['tags_per_node'] = ( 100.0 * @stats['node_tags'] / @stats['nodes_with_tags']).to_i.to_f / 100 @stats['tags_per_way'] = ( 100.0 * @stats['way_tags'] / @stats['ways']).to_i.to_f / 100 |