-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathrun-all-benchmarks.bat
61 lines (50 loc) · 2.1 KB
/
run-all-benchmarks.bat
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
@echo off
SET HOST=localhost
REM SET HOST=10.0.0.64
SET REQUESTS=10000
SET DB=SqlServer
:AspNet
SET PORT=55000
SET ID=aspnet
ab -n 1 "http://%HOST%:%PORT%/reset/full"
CALL :Benchmark
:HttpListener
SET PORT=55001
SET ID=httplistener
START servers\Techempower.HttpListener\bin\Release\Techempower.HttpListener.exe %DB%
ab -n 1 "http://%HOST%:%PORT%/reset/full"
CALL :Benchmark
taskkill /f /im Techempower.HttpListener.exe
:HttpListenerPool
SET PORT=55002
SET ID=httplistenerpool
START servers\Techempower.HttpListener.Pool\bin\Release\Techempower.HttpListener.Pool.exe 64 %DB%
ab -n 1 "http://%HOST%:%PORT%/reset/full"
CALL :Benchmark
taskkill /f /im Techempower.HttpListener.Pool.exe
:SmartPool
SET PORT=55003
SET ID=httplistenersmartpool
START servers\Techempower.HttpListener.SmartPool\bin\Release\Techempower.HttpListener.SmartPool.exe 16 %DB%
ab -n 1 "http://%HOST%:%PORT%/reset/full"
CALL :Benchmark
taskkill /f /im Techempower.HttpListener.SmartPool.exe
GOTO End
:Benchmark
SET URL=http://%HOST%:%PORT%
FOR %%A IN (json plaintext) DO ab -k -n %REQUESTS% -c 10 "%URL%/%%A" > results\raw_%REQUESTS%_10_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
FOR %%A IN (json plaintext) DO ab -k -n %REQUESTS% -c 100 "%URL%/%%A" > results\raw_%REQUESTS%_100_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
FOR %%A IN (json plaintext) DO ab -k -n %REQUESTS% -c 256 "%URL%/%%A" > results\raw_%REQUESTS%_256_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
ab -k -n %REQUESTS% -c 1000 "%URL%/plaintext" > results\raw_10000_1000_plaintext_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
FOR %%A IN (db queries fortunes updates) DO ab -k -n %REQUESTS% -c 10 "%URL%/%%A" > results\db_%REQUESTS%_10_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
FOR %%A IN (db queries fortunes updates) DO ab -k -n %REQUESTS% -c 100 "%URL%/%%A" > results\db_%REQUESTS%_100_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
FOR %%A IN (db queries fortunes updates) DO ab -k -n %REQUESTS% -c 256 "%URL%/%%A" > results\db_%REQUESTS%_256_%%A_%ID%.txt
ab -n 1 "http://%HOST%:%PORT%/reset/gc" > nul
GOTO :EOF
:End