forked from haiwan/sledge
parent
ef777c2705
commit
25d746c2e4
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
# Executes the runtime in GDB
|
||||
# Substitutes the absolute path from the container with a path relatively derived from the location of this script
|
||||
# This allows debugging outside of the Docker container
|
||||
# Also disables pagination and stopping on SIGUSR1
|
||||
|
||||
declare project_path="$(
|
||||
cd "$(dirname "$1")/../.."
|
||||
pwd
|
||||
)"
|
||||
echo $project_path
|
||||
cd ../../bin
|
||||
export LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH"
|
||||
gdb --eval-command="handle SIGUSR1 nostop" \
|
||||
--eval-command="set pagination off" \
|
||||
--eval-command="set substitute-path /sledge/runtime $project_path" \
|
||||
--eval-command="run ../tests/mixed_preemption/test_mixed_preemption.json" \
|
||||
./sledgert
|
||||
cd ../../tests
|
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
# cd ../../bin
|
||||
# LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/mixed_preemption/test_mixed_preemption.json &
|
||||
# cd ../tests/mixed_preemption/
|
||||
|
||||
# TODO: Run small samples on each port to let the runtime figure out the execution time
|
||||
# ab -s 999999999 -v 4 -n 50 -c 1 -r -p ./req/fib10.txt localhost:10010/
|
||||
# ab -s 999999999 -v 4 -n 50 -c 1 -r -p ./req/fib20.txt localhost:10020/
|
||||
# ab -s 999999999 -v 4 -n 50 -c 1 -r -p ./req/fib25.txt localhost:10025/
|
||||
# ab -s 999999999 -v 4 -n 50 -c 1 -r -p ./req/fib30.txt localhost:10030/
|
||||
# ab -s 999999999 -v 4 -n 50 -c 1 -r -p ./req/fib35.txt localhost:10035/
|
||||
wrk -d 10s -t1 -s post.lua http://localhost:10010 -- 2 10\n >/dev/null
|
||||
# wrk -d 10s -t1 -s post.lua http://localhost:10030 -- 2 30\n >/dev/null
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10020 -- 2 20\n
|
||||
|
||||
# fib(10)
|
||||
# sleep 2
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10010 -- 20 10\n >./res/fib10.txt
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10020 -- 2 20\n >./res/fib20.txt &
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10025 -- 2 25\n >./res/fib25.txt &
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10030 -- 2 30\n >./res/fib30.txt
|
||||
# wrk -d 1m -t1 -s post.lua http://localhost:10035 -- 2 35\n
|
||||
# ab -n 10000 -c 1 -r -p ./req/fib10.txt localhost:10000/ >./res/fib10.txt &
|
||||
# ab -n 10000 -c 1 -r -p ./req/fib20.txt localhost:10001/ >./res/fib20.txt &
|
||||
# ab -n 10000 -c 1 -r -p ./req/fib25.txt localhost:10002/ >./res/fib25.txt &
|
||||
# ab -n 10000 -c 1 -r -p ./req/fib30.txt localhost:10030/ >./res/fib30.txt &
|
||||
# ab -n 10000 -c 1 -r -p ./req/fib35.txt localhost:10035/ >./res/fib35.txt
|
||||
|
||||
# Kill the Background Sledge processes
|
||||
# ps -e -o pid,cmd | grep sledgert | grep json | cut -d\ -f 1 | xargs kill
|
||||
# pkill sledgert
|
||||
# pkill ab
|
||||
# pkill wrk
|
@ -0,0 +1,43 @@
|
||||
-- Default to 1 request / second
|
||||
wrk.method = "POST"
|
||||
wrk.body = "10\n"
|
||||
wrk.headers["Content-Type"] = "text/plain"
|
||||
local delay_val = 1000
|
||||
|
||||
function init(args)
|
||||
if #args >= 1 then
|
||||
-- First argument is "requests per second" per thread
|
||||
delay_val = (1000 / args[1])
|
||||
end
|
||||
|
||||
if #args >= 2 then
|
||||
-- Second argument is argument
|
||||
wrk.body = args[2]
|
||||
end
|
||||
end
|
||||
|
||||
-- Uncomment to dynamically generate a different request each time
|
||||
-- function request()
|
||||
-- return wrk.format(nil, nil, nil,tostring(math.random(10, 23)) .."\n")
|
||||
-- end
|
||||
|
||||
-- Wrk calls a function name delay to get the delay between requests (in ms)
|
||||
function delay()
|
||||
return delay_val
|
||||
end
|
||||
|
||||
function response(status, headers, body)
|
||||
io.write(string.format("%s: %s\n", status, body))
|
||||
end
|
||||
|
||||
-- Done Phase
|
||||
|
||||
-- Called when complete, presenting aggregate results
|
||||
function done(summary, latency, requests)
|
||||
for i = 1, 99 do
|
||||
io.write(string.format("%d %d\n", i, latency:percentile(i)))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
@ -0,0 +1,107 @@
|
||||
Running 1m test @ http://localhost:10010
|
||||
1 threads and 10 connections
|
||||
Thread Stats Avg Stdev Max +/- Stdev
|
||||
Latency 0.00us 0.00us 0.00us -nan%
|
||||
Req/Sec 0.00 0.00 0.00 -nan%
|
||||
0 requests in 1.00m, 0.00B read
|
||||
Requests/sec: 0.00
|
||||
Transfer/sec: 0.00B
|
||||
1 0
|
||||
2 0
|
||||
3 0
|
||||
4 0
|
||||
5 0
|
||||
6 0
|
||||
7 0
|
||||
8 0
|
||||
9 0
|
||||
10 0
|
||||
11 0
|
||||
12 0
|
||||
13 0
|
||||
14 0
|
||||
15 0
|
||||
16 0
|
||||
17 0
|
||||
18 0
|
||||
19 0
|
||||
20 0
|
||||
21 0
|
||||
22 0
|
||||
23 0
|
||||
24 0
|
||||
25 0
|
||||
26 0
|
||||
27 0
|
||||
28 0
|
||||
29 0
|
||||
30 0
|
||||
31 0
|
||||
32 0
|
||||
33 0
|
||||
34 0
|
||||
35 0
|
||||
36 0
|
||||
37 0
|
||||
38 0
|
||||
39 0
|
||||
40 0
|
||||
41 0
|
||||
42 0
|
||||
43 0
|
||||
44 0
|
||||
45 0
|
||||
46 0
|
||||
47 0
|
||||
48 0
|
||||
49 0
|
||||
50 0
|
||||
51 0
|
||||
52 0
|
||||
53 0
|
||||
54 0
|
||||
55 0
|
||||
56 0
|
||||
57 0
|
||||
58 0
|
||||
59 0
|
||||
60 0
|
||||
61 0
|
||||
62 0
|
||||
63 0
|
||||
64 0
|
||||
65 0
|
||||
66 0
|
||||
67 0
|
||||
68 0
|
||||
69 0
|
||||
70 0
|
||||
71 0
|
||||
72 0
|
||||
73 0
|
||||
74 0
|
||||
75 0
|
||||
76 0
|
||||
77 0
|
||||
78 0
|
||||
79 0
|
||||
80 0
|
||||
81 0
|
||||
82 0
|
||||
83 0
|
||||
84 0
|
||||
85 0
|
||||
86 0
|
||||
87 0
|
||||
88 0
|
||||
89 0
|
||||
90 0
|
||||
91 0
|
||||
92 0
|
||||
93 0
|
||||
94 0
|
||||
95 0
|
||||
96 0
|
||||
97 0
|
||||
98 0
|
||||
99 0
|
@ -0,0 +1,70 @@
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "fibonacci_10",
|
||||
"path": "fibonacci_wasm.so",
|
||||
"port": 10010,
|
||||
"relative-deadline-us": 4000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "fibonacci_20",
|
||||
"path": "fibonacci_wasm.so",
|
||||
"port": 10020,
|
||||
"relative-deadline-us": 5000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "fibonacci_25",
|
||||
"path": "fibonacci_wasm.so",
|
||||
"port": 10025,
|
||||
"relative-deadline-us": 6000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "fibonacci_30",
|
||||
"path": "fibonacci_wasm.so",
|
||||
"port": 10030,
|
||||
"relative-deadline-us": 8000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": "yes",
|
||||
"name": "fibonacci_35",
|
||||
"path": "fibonacci_wasm.so",
|
||||
"port": 10035,
|
||||
"relative-deadline-us": 53000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1024,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
Loading…
Reference in new issue