Class: Snapstats::EventReader::Performance
- Inherits:
-
Object
- Object
- Snapstats::EventReader::Performance
- Defined in:
- lib/event_reader/event_reader.rb
Class Method Summary collapse
Class Method Details
.fetch_slowest_controllers ⇒ Object
62 63 64 65 66 67 68 69 |
# File 'lib/event_reader/event_reader.rb', line 62 def self.fetch_slowest_controllers Snapstats.redis.zrevrangebyscore(Snapstats.mday('performance:controllers'), '+inf', '-inf', { withscores: true }).map do |i| v = JSON.parse(i.first, :symbolize_names => true) time = i.last self.new(controller: v[:ctrl], action: v[:actn], render_time: time) end end |