{"action":"created","issue":{"url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/1","labels_url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/1/comments","events_url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/1/events","html_url":"https://github.com/schmrlng/CPUTime.jl/issues/1","id":60279344,"number":1,"title":"Merge CPUTime into JuliaLang","user":{"login":"zoohair","id":430175,"avatar_url":"https://avatars.githubusercontent.com/u/430175?v=3","gravatar_id":"","url":"https://api.github.com/users/zoohair","html_url":"https://github.com/zoohair","followers_url":"https://api.github.com/users/zoohair/followers","following_url":"https://api.github.com/users/zoohair/following{/other_user}","gists_url":"https://api.github.com/users/zoohair/gists{/gist_id}","starred_url":"https://api.github.com/users/zoohair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zoohair/subscriptions","organizations_url":"https://api.github.com/users/zoohair/orgs","repos_url":"https://api.github.com/users/zoohair/repos","events_url":"https://api.github.com/users/zoohair/events{/privacy}","received_events_url":"https://api.github.com/users/zoohair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-08T22:15:34Z","updated_at":"2015-03-09T02:41:47Z","closed_at":null,"body":"This pretty useful. It would be nice to have it as part of the master branch."},"comment":{"url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/comments/77792480","html_url":"https://github.com/schmrlng/CPUTime.jl/issues/1#issuecomment-77792480","issue_url":"https://api.github.com/repos/schmrlng/CPUTime.jl/issues/1","id":77792480,"user":{"login":"schmrlng","id":4130030,"avatar_url":"https://avatars.githubusercontent.com/u/4130030?v=3","gravatar_id":"","url":"https://api.github.com/users/schmrlng","html_url":"https://github.com/schmrlng","followers_url":"https://api.github.com/users/schmrlng/followers","following_url":"https://api.github.com/users/schmrlng/following{/other_user}","gists_url":"https://api.github.com/users/schmrlng/gists{/gist_id}","starred_url":"https://api.github.com/users/schmrlng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schmrlng/subscriptions","organizations_url":"https://api.github.com/users/schmrlng/orgs","repos_url":"https://api.github.com/users/schmrlng/repos","events_url":"https://api.github.com/users/schmrlng/events{/privacy}","received_events_url":"https://api.github.com/users/schmrlng/received_events","type":"User","site_admin":false},"created_at":"2015-03-09T02:41:47Z","updated_at":"2015-03-09T02:41:47Z","body":"I'm hesitant to do this as modern linear algebra libraries (OpenBLAS) have really good support for multi-threading, and this can lead to incorrect conclusions being drawn about timing since CPU time is summed across all child threads of a process:\r\n\r\n```julia\r\njulia> n = 1000; A = rand(n,n); B = rand(n,n);\r\njulia> @time @CPUtime C = A*B;     # matrix multiplication on a quad-core i7\r\nelapsed CPU time: 0.178905 seconds\r\nelapsed time: 0.045403309 seconds (8000488 bytes allocated)\r\n```\r\n\r\nSee also https://github.com/JuliaLang/julia/issues/10157. It might seem that a possible resolution would be counting only the CPU time used by the top-level process, but that can also be misleading - in this case it's probably 0. For multi-core machines, I still don't know a good way to reliably benchmark code when you've got other stuff going on in the background (the motivation of this package in the first place: http://stackoverflow.com/questions/24427185/measuring-elapsed-cpu-time-in-julia/). Oh well.\r\n\r\nSo unless you're running single-threaded code (scientific computing without any linear algebra??), the utility of this package is sort of nebulous, which is why I haven't bothered trying to register it with the Julia package manager. Putting it in Julia master would probably do more harm than help."}}