Revision c30fd6f2
Added by Lukas Zapletal almost 6 years ago
lib/tasks/trends.rake | ||
---|---|---|
|
||
desc 'Reduces amount of points for each trend group'
|
||
task :reduce => :environment do
|
||
start = Time.now
|
||
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
||
|
||
trends = Trend.pluck(:id)
|
||
trends_count = trends.length
|
||
... | ... | |
|
||
TrendCounter.unscoped.where(interval_start: nil).delete_all
|
||
|
||
puts "It took #{Time.now - start} seconds to complete" unless Rails.env.test?
|
||
puts "It took #{Process.clock_gettime(Process::CLOCK_MONOTONIC) - start} seconds to complete" unless Rails.env.test?
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #23808 - monotonic timer to measure durations