nushell/benches
Antoine Stevan 7d301c76d3
use create_default_context from nu-cmd-lang (#9454)
a recent addition must have removed the `create_default_context` command
from `nu_command`, which breaks the benchmarks 😮

## before this PR
```bash
cargo check --all-targets --workspace
```
gives a bunch of
```bash
error[E0425]: cannot find function `create_default_context` in crate `nu_command`
  --> benches/benchmarks.rs:93:48
   |
93 |             let mut engine_state = nu_command::create_default_context();
   |                                                ^^^^^^^^^^^^^^^^^^^^^^ not found in `nu_command`
   |
help: consider importing this function
   |
1  | use nu_cmd_lang::create_default_context;
   |
help: if you import `create_default_context`, refer to it directly
   |
93 -             let mut engine_state = nu_command::create_default_context();
93 +             let mut engine_state = create_default_context();
   |
```
and `cargo bench` does not run...

## with this PR
```bash
cargo check --all-targets --workspace
```
is not happy and the benchmarks run again with `cargo bench`

---------

Co-authored-by: sholderbach <sholderbach@users.noreply.github.com>
2023-06-17 14:41:29 +02:00
..
benchmarks.rs use create_default_context from nu-cmd-lang (#9454) 2023-06-17 14:41:29 +02:00
README.md Add Criterion benchmarks for parser (#7686) 2023-01-05 11:39:54 -08:00

Criterion benchmarks

These are benchmarks using Criterion, a microbenchmarking tool for Rust.

Run all benchmarks with cargo bench

Or run individual benchmarks like cargo bench -- <regex> e.g. cargo bench -- parse