oils-for-unix / oils

Oils is our upgrade path from bash to a better language and runtime. It's also for Python and JavaScript users who avoid shell!
http://www.oilshell.org/
Other
2.82k stars 154 forks source link

autoprofile mode -- rusage() on every process #898

Open andychu opened 3 years ago

andychu commented 3 years ago

I think this is cheap enough that people could turn it on ALWAYS? Should be easy to measure.

I think we also use gettimeofday().

Related: https://github.com/oilshell/oil/blob/master/benchmarks/time-helper.c

http://www.oilshell.org/blog/2020/11/fixes-and-updates.html#why-i-wrote-a-timing-tool-in-c

I wonder if it could be extended with additional information to be able to find bottlenecks in pipelines (e.g. the CPU time that each part of the pipeline took)

andychu commented 3 years ago

Also noticed that this blog post used "time in a shell": https://blog.racket-lang.org/2021/01/racket-status.html