mirror of
https://github.com/theryangeary/choose
synced 2024-11-10 05:24:13 +00:00
389c29822b
Add tags, todo, *.bench, *.svg and bench_output to .gitignore Add test/bench.sh script. bench.sh runs the `bench` command on each test/long*txt file with range 3:5 and saves the output to a file for comparing performance across file sizes. Inline printing in get_choice_slice Change BufWriter<..stdout..> to BufWriter<T> Add MockStdout for testing printing Add more reverse range tests Simplify word finding with a more uniform bounds check. Add Makefile for generating flamegraphs Redefine Choice struct as a start and end integer Improve algorithm for finding words to print Settle exclusivity at Config construction time Add tests for nonexistant field_seps Add regression test for preceding separator Use handle.write instead of write! macro for tremendous speed up
10 lines
265 B
Bash
Executable file
10 lines
265 B
Bash
Executable file
#!/bin/bash
|
|
cargo build --release # always be up to date
|
|
output="bench_output"
|
|
mkdir -p $output
|
|
inputs=($(find test -name "long*txt" | sort -r))
|
|
for i in {0..4}
|
|
do
|
|
echo ${inputs[$i]}
|
|
bench "target/release/choose 3:5 -i ${inputs[$i]}" > $output/$1$i.bench
|
|
done
|