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 a benchmark
command
#1733
Comments
I would like to work on this. |
@pag4k great - I've assigned it to you |
Shouldn't be clearer and shorter to be |
I think Another option is |
Yea, I guess |
Closed by #2223 |
Is your feature request related to a problem? Please describe.
It's sometimes helpful to want to measure how long a block takes to execute. It'd be nice to be able to measure this inside of Nu.
Describe the solution you'd like
Let's add a
benchmark
command that takes a block as input. When run,benchmark
will start timing, run the block to completion, and then report the time it took to run the block.The
benchmark
command can return the time as a Duration value.Additional context
You can read the
with-env
command source code at "crates/nu-cli/src/commands/with_env.rs" to learn how to run a block to completion.The text was updated successfully, but these errors were encountered: