Guest User

Untitled

a guest
Jul 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. Event.count
  2. => 7442
  3. >> e = AllEventsStats.new(:started_at => Event.first.timestamp, :stopped_at => Time.now)
  4. => #<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>
  5. >> e.calculate!
  6. => true
  7. >> e
  8. => #<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">
  9. >>
Add Comment
Please, Sign In to add comment