From d96243fa5b01f4b99875e8744200401b15840c72 Mon Sep 17 00:00:00 2001 From: Qwerasd Date: Tue, 6 Feb 2024 19:30:27 -0500 Subject: [PATCH] bench/stream: script adjustments --- src/bench/stream.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/bench/stream.sh b/src/bench/stream.sh index 1099b54a2..41d62f234 100755 --- a/src/bench/stream.sh +++ b/src/bench/stream.sh @@ -7,20 +7,24 @@ # Options: # - "ascii", uniform random ASCII bytes # - "utf8", uniform random unicode characters, encoded as utf8 -DATA="ascii" +# - "rand", pure random data, will contain many invalid code sequences. +DATA="utf8" SIZE="25000000" # Uncomment to test with an active terminal state. -#ARGS=" --terminal" +# ARGS=" --terminal" # Generate the benchmark input ahead of time so it's not included in the time. ./zig-out/bin/bench-stream --mode=gen-$DATA | head -c $SIZE > /tmp/ghostty_bench_data +# Uncomment to instead use the contents of `stream.txt` as input. +# yes $(cat ./stream.txt) | head -c $SIZE > /tmp/ghostty_bench_data + hyperfine \ --warmup 10 \ -n memcpy \ - "cat /tmp/ghostty_bench_data | ./zig-out/bin/bench-stream --mode=noop${ARGS}" \ + "./zig-out/bin/bench-stream --mode=noop${ARGS}