Skip to content

Commit 501e6d5

Browse files
committed
tweak benchmark some more
1 parent a01e2ec commit 501e6d5

File tree

1 file changed

+55
-49
lines changed

1 file changed

+55
-49
lines changed

benchmark.sh

Lines changed: 55 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
# Assumes we need to install everything from scratch on a box for benchmarking
44
# Also assumes we have copied the ./examples/performance_tests/create_performance_test.py file to where this is run
55

6-
apt-get update
7-
apt-get install --assume-yes build-essential unzip tmux python htop
6+
apt update
7+
apt install --assume-yes build-essential unzip tmux htop
88

99
rm *.zip
1010
wget https://github.com/boyter/scc/releases/download/v1.0.0/scc-1.0.0-x86_64-unknown-linux.zip
@@ -111,73 +111,82 @@ mv scc /usr/local/bin/scc2.9.1
111111

112112
wget https://github.com/boyter/scc/releases/download/v2.10.0/scc-2.10.0-x86_64-unknown-linux.zip
113113
unzip scc-2.10.0-x86_64-unknown-linux.zip
114-
cp scc /usr/local/bin/scc2.10.0
114+
mv scc /usr/local/bin/scc2.10.0
115115

116116
wget https://github.com/boyter/scc/releases/download/v2.10.0/scc-2.11.0-x86_64-unknown-linux.zip
117117
unzip scc-2.11.0-x86_64-unknown-linux.zip
118-
cp scc /usr/local/bin/scc2.11.0
118+
mv scc /usr/local/bin/scc2.11.0
119119

120120
wget https://github.com/boyter/scc/releases/download/v2.10.0/scc-2.12.0-x86_64-unknown-linux.zip
121121
unzip scc-2.12.0-x86_64-unknown-linux.zip
122-
cp scc /usr/local/bin/scc2.12.0
122+
mv scc /usr/local/bin/scc2.12.0
123123

124124
wget https://github.com/boyter/scc/releases/download/v2.10.0/scc-2.13.0-x86_64-unknown-linux.zip
125125
unzip scc-2.13.0-x86_64-unknown-linux.zip
126-
cp scc /usr/local/bin/scc2.13.0
126+
mv scc /usr/local/bin/scc2.13.0
127127

128128
wget https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip
129129
unzip scc-3.0.0-x86_64-unknown-linux.zip
130-
cp scc /usr/local/bin/scc3.0.0
130+
mv scc /usr/local/bin/scc3.0.0
131131

132132
wget https://github.com/boyter/scc/releases/download/v3.1.0/scc_3.1.0_Linux_x86_64.tar.gz
133-
unzip scc_3.1.0_Linux_x86_64.tar.gz
134-
cp scc /usr/local/bin/scc3.1.0
135-
136-
wget https://github.com/boyter/scc/releases/download/v3.2.0/scc_3.2.0_Linux_x86_64.tar.gz
137-
unzip scc_3.2.0_Linux_x86_64.tar.gz
138-
cp scc /usr/local/bin/scc3.2.0
139-
140-
wget https://github.com/boyter/scc/releases/download/v3.3.0/scc_3.3.0_Linux_x86_64.tar.gz
141-
unzip scc_3.3.0_Linux_x86_64.tar.gz
142-
cp scc /usr/local/bin/scc3.3.0
143-
144-
wget https://github.com/boyter/scc/releases/download/v3.3.0/scc_3.3.2_Linux_x86_64.tar.gz
145-
unzip scc_3.3.2_Linux_x86_64.tar.gz
146-
cp scc /usr/local/bin/scc3.3.2
147-
148-
wget https://github.com/boyter/scc/releases/download/v3.3.0/scc_3.3.3_Linux_x86_64.tar.gz
149-
unzip scc_3.3.3_Linux_x86_64.tar.gz
150-
cp scc /usr/local/bin/scc3.3.3
151-
152-
wget https://github.com/boyter/scc/releases/download/v3.4.0/scc_3.4.3_Linux_x86_64.tar.gz
153-
unzip scc_3.3.4_Linux_x86_64.tar.gz
154-
cp scc /usr/local/bin/scc3.3.4
133+
tar zxvf scc_3.1.0_Linux_x86_64.tar.gz
134+
mv scc /usr/local/bin/scc3.1.0
135+
136+
wget https://github.com/boyter/scc/releases/download/v3.2.0/scc_Linux_x86_64.tar.gz
137+
tar zxvf scc_Linux_x86_64.tar.gz
138+
mv scc /usr/local/bin/scc3.2.0
139+
rm scc_Linux_x86_64.tar.gz
140+
141+
wget https://github.com/boyter/scc/releases/download/v3.3.0/scc_Linux_x86_64.tar.gz
142+
tar zxvf scc_Linux_x86_64.tar.gz
143+
mv scc /usr/local/bin/scc3.3.0
144+
rm scc_Linux_x86_64.tar.gz
145+
146+
wget https://github.com/boyter/scc/releases/download/v3.3.2/scc_Linux_x86_64.tar.gz
147+
tar zxvf scc_Linux_x86_64.tar.gz
148+
mv scc /usr/local/bin/scc3.3.2
149+
rm scc_Linux_x86_64.tar.gz
150+
151+
wget https://github.com/boyter/scc/releases/download/v3.3.3/scc_Linux_x86_64.tar.gz
152+
tar zxvf scc_Linux_x86_64.tar.gz
153+
mv scc /usr/local/bin/scc3.3.3
154+
rm scc_Linux_x86_64.tar.gz
155+
156+
wget https://github.com/boyter/scc/releases/download/v3.3.4/scc_Linux_x86_64.tar.gz
157+
tar zxvf scc_Linux_x86_64.tar.gz
158+
mv scc /usr/local/bin/scc3.3.4
159+
rm scc_Linux_x86_64.tar.gz
155160

156161
# Now setup the most recent as the default
162+
wget https://github.com/boyter/scc/releases/download/v3.3.4/scc_Linux_x86_64.tar.gz
163+
tar zxvf scc_Linux_x86_64.tar.gz
157164
mv scc /usr/local/bin/scc
158165

159-
echo "Setting up rust toolchain"
160-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
161-
source $HOME/.cargo/env
166+
#echo "Setting up rust toolchain"
167+
#curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
168+
#source $HOME/.cargo/env
169+
#
170+
#cargo install hyperfine tokei loc
171+
172+
wget https://github.com/sharkdp/hyperfine/releases/download/v1.18.0/hyperfine-v1.18.0-x86_64-unknown-linux-musl.tar.gz
173+
tar zxvf hyperfine-v1.18.0-x86_64-unknown-linux-musl.tar.gz
174+
mv hyperfine-v1.18.0-x86_64-unknown-linux-musl/hyperfine /usr/local/bin/hyperfine
175+
chmod +x /usr/local/bin/hyperfine
162176

163-
cargo install hyperfine tokei loc
177+
wget https://github.com/XAMPPRocky/tokei/releases/download/v12.1.2/tokei-x86_64-unknown-linux-musl.tar.gz
178+
tar zxvf tokei-x86_64-unknown-linux-musl.tar.gz
179+
chmod +x ./tokei
180+
mv ./tokei /usr/local/bin/
164181

165182
wget https://github.com/vmchale/polyglot/releases/download/0.5.29/poly-x86_64-unknown-linux-gcc-9
166183
mv poly-x86_64-unknown-linux-gcc-9 /usr/local/bin/polyglot
167184
chmod +x /usr/local/bin/polyglot
168185

169186
# Now setup all of the benchmarks
170187

171-
rm -rf artificial
172-
mkdir artificial
173-
cp create_performance_test.py artificial
174-
cd artificial
175-
python create_performance_test.py
176-
cd ..
177-
rm artificial/create_performance_test.py
178-
179188
# Clone the stuff we want to test
180-
rm -rf redis
189+
rm -rf valkey
181190
rm -rf cpython
182191
rm -rf linux
183192
rm -rf sourcegraph
@@ -192,19 +201,16 @@ echo "Running regression benchmark"
192201
hyperfine 'scc1.0.0 linux' 'scc1.1.0 linux' 'scc1.2.0 linux' 'scc1.3.0 linux' 'scc1.4.0 linux' 'scc1.5.0 linux' 'scc1.6.0 linux' 'scc1.7.0 linux' 'scc1.8.0 linux' 'scc1.9.0 linux' 'scc1.10.0 linux' 'scc1.11.0 linux' 'scc1.12.0 linux' 'scc1.12.1 linux' 'scc2.0.0 linux' 'scc2.1.0 linux' 'scc2.2.0 linux' 'scc2.3.0 linux' 'scc2.4.0 linux' 'scc2.5.0 linux' 'scc2.6.0 linux' 'scc2.7.0 linux' 'scc2.8.0 linux' 'scc2.9.0 linux' 'scc2.9.1 linux' 'scc2.10.0 linux' 'scc2.11.0 linux' 'scc2.12.0 linux' 'scc2.13.0 linux' 'scc3.0.0 linux' 'scc3.1.0 linux' 'scc3.2.0 linux' 'scc3.3.0 linux' 'scc3.3.2 linux' 'scc3.3.3 linux' 'scc3.3.4 linux' > benchmark_regression.txt
193202

194203
# Benchmark against everything
195-
echo "Running artificial benchmark"
196-
hyperfine 'scc artificial' 'scc -c artificial' 'tokei artificial' 'loc artificial' 'polyglot artificial' > benchmark_artificial.txt
197-
198204
echo "Running valkey benchmark"
199-
hyperfine 'scc valkey' 'scc -c valkey' 'tokei valkey' 'loc valkey' 'polyglot valkey' > benchmark_valkey.txt
205+
hyperfine 'scc valkey' 'scc -c valkey' 'tokei valkey' 'polyglot valkey' > benchmark_valkey.txt
200206

201207
echo "Running cpython benchmark"
202-
hyperfine 'scc cpython' 'scc -c cpython' 'tokei cpython' 'loc cpython' 'polyglot cpython' > benchmark_cpython.txt
208+
hyperfine 'scc cpython' 'scc -c cpython' 'tokei cpython' 'polyglot cpython' > benchmark_cpython.txt
203209

204210
echo "Running sourcegraph benchmark"
205-
hyperfine 'scc sourcegraph' 'scc -c sourcegraph' 'tokei sourcegraph' 'loc sourcegraph' 'polyglot sourcegraph' > benchmark_sourcegraph.txt
211+
hyperfine 'scc sourcegraph' 'scc -c sourcegraph' 'tokei sourcegraph' 'polyglot sourcegraph' > benchmark_sourcegraph.txt
206212

207213
echo "Running linux benchmark"
208-
hyperfine 'scc linux' 'scc -c linux' 'tokei linux' 'loc linux' 'polyglot linux' > benchmark_linux.txt
214+
hyperfine 'scc linux' 'scc -c linux' 'tokei linux' 'polyglot linux' > benchmark_linux.txt
209215

210216
echo "All done!"

0 commit comments

Comments
 (0)