mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 13:29:12 +00:00
dbg
This commit is contained in:
parent
9e6ca69843
commit
0987be4c2d
3 changed files with 11 additions and 6 deletions
|
@ -1,8 +1,7 @@
|
||||||
|
|
||||||
# Running the benchmarks
|
# Running the benchmarks
|
||||||
|
|
||||||
Install cargo criterion:
|
If you're not using nix, install cargo criterion:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo install cargo-criterion
|
cargo install cargo-criterion
|
||||||
```
|
```
|
||||||
|
@ -13,7 +12,7 @@ To prevent stack overflow on the `CFold` benchmark:
|
||||||
ulimit -s unlimited
|
ulimit -s unlimited
|
||||||
```
|
```
|
||||||
|
|
||||||
In the `cli` folder execute:
|
In the `crates/cli` folder execute:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cargo criterion
|
cargo criterion
|
||||||
|
|
|
@ -20,7 +20,7 @@ fn exec_bench_w_input<T: Measurement>(
|
||||||
);
|
);
|
||||||
|
|
||||||
if !compile_out.stderr.is_empty() && compile_out.stderr != "🔨 Rebuilding platform...\n" {
|
if !compile_out.stderr.is_empty() && compile_out.stderr != "🔨 Rebuilding platform...\n" {
|
||||||
panic!("{}", compile_out.stderr);
|
panic!("stderr was not empty:\n\t{}", compile_out.stderr);
|
||||||
}
|
}
|
||||||
|
|
||||||
assert!(
|
assert!(
|
||||||
|
|
|
@ -250,12 +250,18 @@ pub fn run_cmd<'a, I: IntoIterator<Item = &'a str>, E: IntoIterator<Item = (&'a
|
||||||
|
|
||||||
let cmd_str = pretty_command_string(&cmd);
|
let cmd_str = pretty_command_string(&cmd);
|
||||||
|
|
||||||
|
dbg!(cmd
|
||||||
|
.stdin(Stdio::piped())
|
||||||
|
.stdout(Stdio::piped())
|
||||||
|
.stderr(Stdio::piped())
|
||||||
|
.spawn());
|
||||||
|
|
||||||
let mut child = cmd
|
let mut child = cmd
|
||||||
.stdin(Stdio::piped())
|
.stdin(Stdio::piped())
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
.spawn()
|
.spawn()
|
||||||
.unwrap_or_else(|_| panic!("failed to execute cmd `{cmd_name}` in CLI test"));
|
.unwrap_or_else(|_| panic!("Failed to execute cmd:\n\t`{:?}`", cmd_str));
|
||||||
|
|
||||||
{
|
{
|
||||||
let stdin = child.stdin.as_mut().expect("Failed to open stdin");
|
let stdin = child.stdin.as_mut().expect("Failed to open stdin");
|
||||||
|
@ -269,7 +275,7 @@ pub fn run_cmd<'a, I: IntoIterator<Item = &'a str>, E: IntoIterator<Item = (&'a
|
||||||
|
|
||||||
let output = child
|
let output = child
|
||||||
.wait_with_output()
|
.wait_with_output()
|
||||||
.unwrap_or_else(|_| panic!("failed to execute cmd `{cmd_name}` in CLI test"));
|
.unwrap_or_else(|_| panic!("Failed to execute cmd:\n\t`{:?}`", cmd_str));
|
||||||
|
|
||||||
Out {
|
Out {
|
||||||
cmd_str,
|
cmd_str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue