Introduction
Introduction Statistics Contact Development Disclaimer Help
perf: auto detect seq(1) and jot(1) - scroll - scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log
Files
Refs
README
LICENSE
---
commit 0e11225a775979a1c42c9b7881f250e2a0092c13
parent 117d7db63f8b0c6fb4c00f1003d2577538a9f517
Author: Jan Klemkow <[email protected]>
Date: Sun, 3 May 2020 22:37:40 +0200
perf: auto detect seq(1) and jot(1)
makes perf.sh more portable
Diffstat:
M perf.sh | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/perf.sh b/perf.sh
@@ -3,21 +3,26 @@
set -eu
num=1000000
+seq=seq
+
+if [ -x /usr/bin/jot ]; then
+ seq=jot
+fi
rm -f perf_*.log
-for i in `jot 10`; do
+for i in `$seq 10`; do
/usr/bin/time st -e jot $num 2>>perf_0.log
done
-for i in `jot 10`; do
+for i in `$seq 10`; do
/usr/bin/time st -e ./ptty jot $num 2>>perf_1.log
done
-for i in `jot 10`; do
+for i in `$seq 10`; do
/usr/bin/time st -e ./ptty ./ptty jot $num 2>>perf_2.log
done
-for i in `jot 10`; do
+for i in `$seq 10`; do
/usr/bin/time st -e ./ptty ./ptty ./ptty jot $num 2>>perf_3.log
done
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.