Spakman / urchin

A Unix shell for Ruby programmers.
http://spakman.github.com/urchin/
GNU General Public License v3.0
36 stars 1 forks source link

Store timing information about commands and jobs #8

Closed Spakman closed 11 years ago

Spakman commented 13 years ago

It's irritating to forget to run a command using time and later want to know how long it took. Consider storing basic information about jobs and commands.

brandondrew commented 11 years ago

I could see this being very useful at times. Is it safe to assume the overhead of running it on everything would be negligible?

Spakman commented 11 years ago

I think so, yes. I was only intending storing the wall clock time since this is what tends to be most interesting to me. It's not really intended for heavy profiling, but should be useful for spotting trends and situations when rough times are all you need.

ae4d9d2c implements the bare bones of this, but I want to store the times in the history too. One thing to be aware of is that it records post-parse --> post-run (in other words, after the command line has been parsed - just before execution - to when the command line returns - just before the next prompt is drawn).

brandondrew commented 11 years ago

If I understand correctly, you meant the feature to be timestamps on each command (with date presumably) rather than running time for each command? To me the timestamps would be even more useful: I've often wanted to be able to look through my command history and know exactly when and where (in what directory) I issued a certain command. I'll create an issue for the where part, along with the implementation approach I envision working best.

Spakman commented 11 years ago

I was meaning the duration of each command (in the same sort of way as time), but I love the idea of actual timestamps too and am definitely interested in adding this.

Spakman commented 11 years ago

Implemented by #14.