Skip to content
Browse files

The INFO response only supports string keys

  • Loading branch information...
1 parent 741889f commit 1f52fee3259dd14e4fb401842719ca64fb71bdea @mtodd mtodd committed Jul 18, 2010
Showing with 5 additions and 5 deletions.
  1. +5 −5 redis-info/redis-info.rb
View
10 redis-info/redis-info.rb
@@ -35,12 +35,12 @@ def build_report
# convert hash keys to symbols
info.keys.each{|k|info[k.to_sym]=info.delete(k)}
- report(:uptime_in_hours => info[:uptime_in_seconds].to_f / 60 / 60)
- report(:used_memory_in_mb => info[:used_memory].to_i / MEGABYTE)
- report(:used_memory_in_kb => info[:used_memory].to_i / KILOBYTE)
+ report(:uptime_in_hours => info['uptime_in_seconds'].to_f / 60 / 60)
+ report(:used_memory_in_mb => info['used_memory'].to_i / MEGABYTE)
+ report(:used_memory_in_kb => info['used_memory'].to_i / KILOBYTE)
- counter(:connections_per_sec, info[:total_connections_received].to_i, :per => :second)
- counter(:commands_per_sec, info[:total_commands_processed].to_i, :per => :second)
+ counter(:connections_per_sec, info['total_connections_received'].to_i, :per => :second)
+ counter(:commands_per_sec, info['total_commands_processed'].to_i, :per => :second)
# General Stats
%w(changes_since_last_save connected_clients connected_slaves bgsave_in_progress).each do |key|

0 comments on commit 1f52fee

Please sign in to comment.
Something went wrong with that request. Please try again.