• Qingyu Zhao's avatar
    Fix Sidekiq job CPU time · 717f159b
    Qingyu Zhao authored
    When measure Sidekiq job CPU time usage, `Process.times` is wrong
    because it counts all threads CPU time in current Sidekiq proces.
    Use `Process.clock_gettime(Process::CLOCK_THREAD_CPUTIME_ID)` instead
    
    Removed `system_s`, `user_s`, and `child_s` - since we can not get
    these values for the job thread. Added `cpu_s`, this is CPU time
    used by the job thread, including system time and user time
    717f159b
structured_logger_spec.rb 7.04 KB