-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add :time
command
#1420
Add :time
command
#1420
Conversation
@qsctr could you add an entry to the CHANGES.md to record that we now have this. I forgot to mention it when reviewing the FFI PR, but we should an entry for the FFI there as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it looks good. The only idea I had (but I am not sure it is really needed) is that it might be nice if the :time
command binds the it
variable with the result of the timing (e.g., using bindItVariableVal
. Not sure if it should bind a record, or just a single number, or if this is needed at all, but my thinking was that if we have that (and also added some sort of "quiet" mode where the timings are just bound to it
but not printed), then we could try to write benchmarking test cases checking that the times are within some range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Adds a
:time
command in the REPL for measuring the evaluation time of an expression. Uses criterion-measurement to do measurements.The analysis that we do is very crude compared to what the full
criterion
package does (we basically just calculate the average times), butcriterion
pulls in much more dependencies so I don't think it's worth adding it.Closes #1415.