-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbench.sh
executable file
·74 lines (63 loc) · 1.34 KB
/
bench.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
DESC_gdkpixbuf="GDK-Pixbuf"
DESC_libswscale="libswscale"
DESC_pixman="Pixman"
DESC_sdl="SDL_gfx"
DESC_skia="Skia"
DESC_smolscale="Smolscale"
DESC_smolscale_mt="Smolscale MT"
DESC_stb="stb_resize"
TESTNAME_gdkpixbuf="gdk_pixbuf"
TESTNAME_libswscale="libswscale"
TESTNAME_pixman="pixman"
TESTNAME_sdl="sdl"
TESTNAME_skia="skia"
TESTNAME_smolscale="smol"
TESTNAME_smolscale_mt="smol-mt"
TESTNAME_stb="stb"
UNITS=" \
gdkpixbuf
libswscale
pixman
stb
smolscale
smolscale_mt
"
UNITS_AVAILABLE=" \
gdkpixbuf
libswscale
pixman
sdl
skia
smolscale
smolscale_mt
stb
"
TESTS=" \
5-1920-1080-0.01-2-200
5-3840-2160-0.01-2-200
5-7680-4320-0.01-1-200
"
TESTS_AVAILABLE="\
20-2000-2000-0.001-1.5-50
50-2000-2000-0.001-1.5-500
10-3840-2160-0.001-2-100
10-16383-16383-0.0001-0.1-100
"
export LD_LIBRARY_PATH="$PWD/skia/out/Shared"
rm -Rf results
mkdir -p results
for UNIT in $UNITS; do
for TEST in $TESTS; do
echo $UNIT: $TEST
eval DESC=\${DESC_${UNIT}}
eval TESTNAME=\${TESTNAME_${UNIT}}
echo \"${DESC}\" >>results/resize-$TEST-samples.txt
echo -n "\"${DESC}\" " >>results/resize-$TEST-average.txt
./test $TESTNAME benchmark $(echo $TEST | sed 's/-/ /g') \
results/resize-$TEST-average.txt \
results/resize-$TEST-samples.txt
echo >>results/resize-$TEST-samples.txt
echo >>results/resize-$TEST-samples.txt
done
done