Sha256: 38d9b9f63c8bfd7004671b1379f15eb4c7eac8dc36cb50ce5a0d2010609bc15d
Contents?: true
Size: 428 Bytes
Versions: 8
Compression:
Stored size: 428 Bytes
Contents
module RailsPerformance module Reports class RecentRequestsReport < BaseReport TIME_WINDOW = 60.minutes def set_defaults @sort ||= :datetimei end def data time_agoi = TIME_WINDOW.ago.to_i db.data .collect{|e| e.record_hash} .select{|e| e if e[sort] >= time_agoi} .sort{|a, b| b[sort] <=> a[sort]} end end end end
Version data entries
8 entries across 8 versions & 1 rubygems