[ruby-dev:49472] [Ruby trunk - Feature #11952] Use getrusage for Process.times if available

From: takashikkbn@...
Date: 2016-01-05 11:59:46 UTC
List: ruby-dev #49472
Issue #11952 has been updated by Takashi Kokubun.


Oops, my description is unexpectedly removed ...

I meant:

before: Process.times #=> #<struct Process::Tms utime=0.06, stime=0.02, cutime=0.02, cstime=0.03>
after: Process.times #=> #<struct Process::Tms utime=0.066553, stime=0.026196, cutime=0.024421, cstime=0.03303>

----------------------------------------
Feature #11952: Use getrusage for Process.times if available
https://bugs.ruby-lang.org/issues/11952#change-55961

* Author: Takashi Kokubun
* Status: Open
* Priority: Normal
* Assignee: 
----------------------------------------
Since times(3) has poor precision, I want to use getrusage(2) for Process.times to get better precision if getrusage is available.

before: Process.times #=> #<struct Process::Tms utime=0.06, stime=0.02, cutime=0.02, cstime=0.03>
after: Process.times #=> #<struct Process::Tms utime=0.065265, stime=0.026326, cutime=0.023249, cstime=0.029963>


---Files--------------------------------
0001-Use-getrusage-for-Process.times-if-available.patch (1.54 KB)


-- 
https://bugs.ruby-lang.org/

In This Thread

Prev Next