Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Event.count
- => 7442
- >> e = AllEventsStats.new(:started_at => Event.first.timestamp, :stopped_at => Time.now)
- => #<AllEventsStats id: nil, type: "AllEventsStats", duration_key: nil, name: nil, statistic: nil, sid: nil, sig_id: nil, started_at: "2009-09-27 21:55:02", stopped_at: "2009-11-25 08:42:18", created_at: nil, updated_at: nil>
- >> e.calculate!
- => true
- >> e
- => #<AllEventsStats id: 4, type: "AllEventsStats", duration_key: nil, name: nil, statistic: 1492, sid: nil, sig_id: nil, started_at: "2009-09-27 21:55:02", stopped_at: "2009-11-25 08:42:18", created_at: "2009-11-25 08:42:23", updated_at: "2009-11-25 08:42:23">
- >>
Add Comment
Please, Sign In to add comment