Compare commits
10 Commits
8eae02580f
...
8990f5c5ed
Author | SHA1 | Date |
---|---|---|
|
8990f5c5ed | 6 months ago |
|
87672b74c4 | 6 months ago |
|
87ba8af8a0 | 6 months ago |
|
a696655ad5 | 6 months ago |
|
10d9659172 | 6 months ago |
|
97b158f508 | 8 months ago |
|
a66ea1bc25 | 8 months ago |
|
4b2a905e92 | 8 months ago |
|
a056d25ff4 | 8 months ago |
|
46b4325dba | 9 months ago |
@ -1,3 +1,3 @@
|
||||
LD_LIBRARY_PATH=/home/hai/sledge-old/runtime/bin
|
||||
SLEDGE_SCHEDULER=EDF
|
||||
SLEDGE_SANDBOX_PERF_LOG=/home/hai/sledge-old/runtime_sandbox_perf_log.log
|
||||
LD_LIBRARY_PATH=/home/hai/sledge/sledge/runtime/bin
|
||||
SLEDGE_SCHEDULER=MDL
|
||||
SLEDGE_SANDBOX_PERF_LOG=/home/hai/sledge/sledge/runtime/tests/runtime_sandbox_perf_log.log
|
||||
|
@ -1,96 +1,114 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Hyde",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Preemption",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/experiments/preemption/spec.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "graph",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/tests/graph.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"sourceFileMap": {"/sledge/runtime": "${workspaceFolder}/runtime"},
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "utest",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/utest/map",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"sourceFileMap": {},
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Hyde",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/experiments/applications/ocr/hyde/spec.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Preemption",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/experiments/preemption/spec.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "graph",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/bin/sledgert",
|
||||
"args": [
|
||||
"${workspaceFolder}/runtime/tests/graph.json"
|
||||
],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"sourceFileMap": {
|
||||
"/sledge/runtime": "${workspaceFolder}/runtime"
|
||||
},
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "utest",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/runtime/utest/map",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"sourceFileMap": {},
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"envFile": "${workspaceFolder}/.env",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "C/C++ Runner: Debug Session",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"externalConsole": false,
|
||||
"cwd": "/home/weihao/sledge/sledge_tree/runtime/tests/noop",
|
||||
"program": "/home/weihao/sledge/sledge_tree/runtime/tests/noop/build/Debug/outDebug",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
|
||||
Summary:
|
||||
Total: 5.2029 secs
|
||||
Slowest: 0.2684 secs
|
||||
Fastest: 0.0281 secs
|
||||
Average: 0.2039 secs
|
||||
Requests/sec: 573.9092
|
||||
|
||||
Total data: 158614 bytes
|
||||
Size/request: 53 bytes
|
||||
|
||||
Response time histogram:
|
||||
0.028 [1] |
|
||||
0.052 [26] |■
|
||||
0.076 [15] |■
|
||||
0.100 [16] |■
|
||||
0.124 [11] |
|
||||
0.148 [16] |■
|
||||
0.172 [46] |■■
|
||||
0.196 [1042] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
|
||||
0.220 [968] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
|
||||
0.244 [702] |■■■■■■■■■■■■■■■■■■■■■■■■■■■
|
||||
0.268 [143] |■■■■■
|
||||
|
||||
|
||||
Latency distribution:
|
||||
10% in 0.1811 secs
|
||||
25% in 0.1894 secs
|
||||
50% in 0.2028 secs
|
||||
75% in 0.2231 secs
|
||||
90% in 0.2385 secs
|
||||
95% in 0.2441 secs
|
||||
99% in 0.2531 secs
|
||||
|
||||
Details (average, fastest, slowest):
|
||||
DNS+dialup: 0.0004 secs, 0.0281 secs, 0.2684 secs
|
||||
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs
|
||||
req write: 0.0002 secs, 0.0000 secs, 0.0249 secs
|
||||
resp wait: 0.2026 secs, 0.0102 secs, 0.2680 secs
|
||||
resp read: 0.0001 secs, 0.0000 secs, 0.0012 secs
|
||||
|
||||
Status code distribution:
|
||||
[200] 2986 responses
|
||||
|
||||
|
||||
|
@ -1,247 +0,0 @@
|
||||
|
||||
Summary:
|
||||
Total: 10.0240 secs
|
||||
Slowest: 1.1570 secs
|
||||
Fastest: 0.0692 secs
|
||||
Average: 0.7488 secs
|
||||
Requests/sec: 3390.6720
|
||||
|
||||
Total data: 33168 bytes
|
||||
Size/request: 48 bytes
|
||||
|
||||
Response time histogram:
|
||||
0.069 [1] |
|
||||
0.178 [16] |■■
|
||||
0.287 [15] |■■
|
||||
0.396 [10] |■
|
||||
0.504 [8] |■
|
||||
0.613 [10] |■
|
||||
0.722 [391] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
|
||||
0.831 [43] |■■■■
|
||||
0.939 [26] |■■■
|
||||
1.048 [69] |■■■■■■■
|
||||
1.157 [102] |■■■■■■■■■■
|
||||
|
||||
|
||||
Latency distribution:
|
||||
10% in 0.6506 secs
|
||||
25% in 0.6649 secs
|
||||
50% in 0.6792 secs
|
||||
75% in 0.9356 secs
|
||||
90% in 1.0743 secs
|
||||
95% in 1.0935 secs
|
||||
99% in 1.1200 secs
|
||||
|
||||
Details (average, fastest, slowest):
|
||||
DNS+dialup: 0.0073 secs, 0.0692 secs, 1.1570 secs
|
||||
DNS-lookup: 0.0000 secs, 0.0000 secs, 0.0000 secs
|
||||
req write: 0.0016 secs, 0.0000 secs, 0.0855 secs
|
||||
resp wait: 0.7388 secs, 0.0480 secs, 1.1547 secs
|
||||
resp read: 0.0004 secs, 0.0001 secs, 0.0047 secs
|
||||
|
||||
Status code distribution:
|
||||
[200] 691 responses
|
||||
|
||||
Error distribution:
|
||||
[5] Post "http://127.0.0.1:10000": EOF
|
||||
[33093] Post "http://127.0.0.1:10000": dial tcp 127.0.0.1:10000: connect: connection refused
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57822->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57830->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57838->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57840->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57850->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57856->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57864->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57876->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57882->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57894->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57906->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57918->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57920->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57934->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57938->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57948->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57958->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57964->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57978->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:57986->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58000->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58008->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58022->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58036->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58052->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58056->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58068->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58082->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58084->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58098->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58104->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58116->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58120->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58134->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58148->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58154->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58170->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58178->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58186->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58190->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58192->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58194->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58198->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58212->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58220->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58230->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58232->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58242->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58246->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58250->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58266->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58270->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58278->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58288->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58300->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58314->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58326->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58332->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58346->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58356->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58366->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58374->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58382->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58392->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58400->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58414->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58416->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58426->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58438->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58450->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58464->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58478->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58492->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58494->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58498->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58508->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58522->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58532->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58546->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58562->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58576->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58588->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58590->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58592->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58594->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58610->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58618->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58634->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58638->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58642->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58648->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58658->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58672->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58688->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58700->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58714->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58730->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58734->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58738->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58744->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58754->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58768->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58780->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58786->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58802->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58816->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58830->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58840->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58848->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58856->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58864->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58876->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58890->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58892->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58908->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58910->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58922->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58928->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58940->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58942->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58948->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58950->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58958->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58966->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58978->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:58994->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59008->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59012->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59016->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59032->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59034->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59044->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59056->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59068->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59078->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59086->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59096->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59108->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59110->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59112->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59120->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59132->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59134->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59140->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59146->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59148->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59152->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59156->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59172->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59180->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59194->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59202->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59218->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59232->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59248->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59264->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59272->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59284->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59300->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59308->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59322->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59332->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59340->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59344->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59352->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59362->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59364->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59376->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59388->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59390->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59392->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59408->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59414->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59420->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59430->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59438->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59454->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59456->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59458->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59462->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59478->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59484->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59486->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59492->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59498->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59512->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59518->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59522->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59536->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59540->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59556->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59562->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59572->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59578->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59592->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59606->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59614->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59618->127.0.0.1:10000: read: connection reset by peer
|
||||
[1] Post "http://127.0.0.1:10000": read tcp 127.0.0.1:59622->127.0.0.1:10000: read: connection reset by peer
|
||||
|
@ -0,0 +1,30 @@
|
||||
import sys
|
||||
|
||||
def calculate_average(input_file, column_index):
|
||||
total = 0
|
||||
count = 0
|
||||
|
||||
with open(input_file, 'r') as f:
|
||||
for line in f:
|
||||
columns = line.strip().split(',')
|
||||
if len(columns) > column_index:
|
||||
try:
|
||||
value = float(columns[column_index])
|
||||
total += value
|
||||
count += 1
|
||||
except ValueError:
|
||||
print(f"error value: {columns[column_index]}")
|
||||
|
||||
if count > 0:
|
||||
average = total / count
|
||||
print(f"list {column_index + 1} average: {average}")
|
||||
else:
|
||||
print("no value")
|
||||
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 3:
|
||||
print(" python calculate_average.py input_file column_index")
|
||||
else:
|
||||
input_file = sys.argv[1]
|
||||
column_index = int(sys.argv[2]) - 1
|
||||
calculate_average(input_file, column_index)
|
@ -0,0 +1,51 @@
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib import font_manager as fm
|
||||
|
||||
def load_data(filename):
|
||||
"""
|
||||
Load data from a file.
|
||||
Assumes that each line in the file is a float value.
|
||||
"""
|
||||
with open(filename, 'r') as file:
|
||||
data = file.read().split()
|
||||
data = [float(i) for i in data]
|
||||
return data
|
||||
|
||||
def main():
|
||||
# 加载数据
|
||||
edf_data = load_data('edf_5k.txt')
|
||||
llf_data = load_data('llf_5k.txt')
|
||||
|
||||
# 设置X轴的数据点
|
||||
x_labels = [50, 60, 70, 80, 90, 100] # 确保数据与这些标签相匹配
|
||||
|
||||
font_properties = fm.FontProperties(family='Times New Roman', size=18)
|
||||
plt.rcParams.update({'font.size': 18, 'font.family': 'Times New Roman'})
|
||||
|
||||
# 创建图形和绘制数据
|
||||
plt.figure(figsize=(10, 6))
|
||||
ax = plt.gca() # 获取当前的Axes对象ax
|
||||
ax.set_facecolor('#f0f0f0') # 设置浅灰色背景
|
||||
plt.plot(x_labels, edf_data, marker='s', linestyle='-', color='#C8503D', markersize=8, label='EDF')
|
||||
plt.plot(x_labels, llf_data, marker='^', linestyle='-', color='#00008B', markersize=8, label='LLF')
|
||||
|
||||
# 添加标题、标签和图例
|
||||
plt.title('5KB-1.2* Deadline', fontsize=20, fontproperties=font_properties)
|
||||
plt.xlabel('Load (% of maximum RPS)', fontproperties=font_properties)
|
||||
plt.ylabel('Deadline Miss Rate (%)', fontproperties=font_properties)
|
||||
plt.legend(prop=font_properties)
|
||||
|
||||
# 设置X轴刻度
|
||||
plt.xticks(range(50, 101, 10))
|
||||
|
||||
# 设置网格
|
||||
plt.grid(True)
|
||||
|
||||
# 移除边框的四边刻度线
|
||||
plt.tick_params(axis='both', which='both', length=0) # 移除刻度线
|
||||
|
||||
# 显示图形
|
||||
plt.show()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -0,0 +1,24 @@
|
||||
# split_logs.py
|
||||
|
||||
def split_logs(input_file):
|
||||
modules = {
|
||||
"resize1": [],
|
||||
"png2bmp1": [],
|
||||
"lpd_wasm1": [],
|
||||
"cifar10_1": [],
|
||||
"work1": []
|
||||
}
|
||||
|
||||
with open(input_file, 'r') as f:
|
||||
for line in f:
|
||||
for module in modules.keys():
|
||||
if module in line:
|
||||
modules[module].append(line.strip())
|
||||
break
|
||||
|
||||
for module, entries in modules.items():
|
||||
with open(f"{module}.txt", 'w') as outfile:
|
||||
outfile.write("\n".join(entries) + "\n")
|
||||
|
||||
if __name__ == "__main__":
|
||||
split_logs("sledge.log")
|
@ -0,0 +1,20 @@
|
||||
import sys
|
||||
|
||||
def split_columns(input_file):
|
||||
columns = []
|
||||
|
||||
with open(input_file, 'r') as f:
|
||||
for line in f:
|
||||
parts = line.strip().split(',')
|
||||
for i, part in enumerate(parts):
|
||||
if len(columns) <= i:
|
||||
columns.append([])
|
||||
columns[i].append(part)
|
||||
|
||||
for i, column in enumerate(columns):
|
||||
with open(f"{input_file[:-4]}_column_{i + 1}.txt", 'w') as outfile:
|
||||
outfile.write("\n".join(column) + "\n")
|
||||
|
||||
if __name__ == "__main__":
|
||||
for input_file in sys.argv[1:]:
|
||||
split_columns(input_file)
|
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct DataNode DataNode;
|
||||
|
||||
DataNode* splitData(char *buffer, uint32_t bufferSize);
|
||||
|
||||
void freeDataNodes(DataNode *head);
|
||||
|
||||
void printDataList(DataNode *head);
|
||||
|
||||
int getDataNodeCount(DataNode *head);
|
||||
|
||||
/**
|
||||
* @param index is form 1 to n
|
||||
*/
|
||||
const char* getDataNodeByIndex(DataNode *head, int index);
|
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
import sys
|
||||
|
||||
def process_file(input_file, noop_functions):
|
||||
data = {noop: [] for noop in noop_functions}
|
||||
|
||||
with open(input_file, "r") as infile:
|
||||
for line in infile:
|
||||
for noop in noop_functions:
|
||||
if noop in line:
|
||||
value = line.split(",")[6]
|
||||
data[noop].append(value)
|
||||
|
||||
for noop, values in data.items():
|
||||
with open(f"{noop}.txt", "w") as outfile:
|
||||
outfile.write("\n".join(values))
|
||||
|
||||
if __name__ == "__main__":
|
||||
noop_functions = ["noop1", "noop2", "noop3", "noop4", "noop5"]
|
||||
|
||||
argv = sys.argv[1:]
|
||||
if len(argv) < 1:
|
||||
print("usage:", sys.argv[0], "file_dir percentage")
|
||||
sys.exit()
|
||||
|
||||
input_file = argv[0]
|
||||
process_file(input_file, noop_functions)
|
@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
void noop() {
|
||||
|
||||
}
|
||||
|
||||
int main() {
|
||||
noop();
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
import os
|
||||
|
||||
def calculate_average(filename):
|
||||
with open(filename, "r") as file:
|
||||
values = file.readlines()
|
||||
values = [int(value.strip()) for value in values]
|
||||
average = sum(values) / len(values) if values else 0
|
||||
return average
|
||||
|
||||
def main():
|
||||
noop_functions = ["noop1", "noop2", "noop3", "noop4", "noop5"]
|
||||
|
||||
for noop in noop_functions:
|
||||
filename = f"{noop}.txt"
|
||||
if os.path.exists(filename):
|
||||
average = calculate_average(filename)
|
||||
print(f"Average for {filename}: {average}")
|
||||
else:
|
||||
print(f"{filename} does not exist.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
@ -0,0 +1,111 @@
|
||||
#include "dag_split_image.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct DataNode {
|
||||
uint32_t dataLength;
|
||||
unsigned char *data;
|
||||
struct DataNode *next;
|
||||
};
|
||||
|
||||
DataNode* splitData(unsigned char *buffer, uint32_t bufferSize) {
|
||||
DataNode *head = NULL;
|
||||
DataNode *tail = NULL;
|
||||
uint32_t offset = 0;
|
||||
|
||||
while (offset < bufferSize) {
|
||||
if (offset + 4 > bufferSize) {
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t dataLength = *(uint32_t *)(buffer + offset);
|
||||
offset += 4;
|
||||
|
||||
if (offset + dataLength > bufferSize) {
|
||||
break;
|
||||
}
|
||||
|
||||
DataNode *newNode = (DataNode *)malloc(sizeof(DataNode));
|
||||
if (newNode == NULL) {
|
||||
perror("Memory allocation failed");
|
||||
freeDataNodes(head);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
newNode->data = (unsigned char *)malloc(dataLength);
|
||||
if (newNode->data == NULL) {
|
||||
free(newNode);
|
||||
perror("Memory allocation failed");
|
||||
freeDataNodes(head);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(newNode->data, buffer + offset, dataLength);
|
||||
newNode->dataLength = dataLength;
|
||||
newNode->next = NULL;
|
||||
|
||||
if (head == NULL) {
|
||||
head = newNode;
|
||||
} else {
|
||||
tail->next = newNode;
|
||||
}
|
||||
tail = newNode;
|
||||
|
||||
offset += dataLength;
|
||||
}
|
||||
return head;
|
||||
}
|
||||
|
||||
void freeDataNodes(DataNode *head) {
|
||||
while (head != NULL) {
|
||||
DataNode *next = head->next;
|
||||
free(head->data);
|
||||
free(head);
|
||||
head = next;
|
||||
}
|
||||
}
|
||||
|
||||
void printDataList(DataNode *head) {
|
||||
int index = 0;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
printf("Data %d: Length = %u\n", index, current->dataLength);
|
||||
index++;
|
||||
current = current->next;
|
||||
}
|
||||
}
|
||||
|
||||
int getDataNodeCount(DataNode *head) {
|
||||
int count = 0;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
count++;
|
||||
current = current->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
unsigned char* getDataNodeByIndex(DataNode *head, int index) {
|
||||
int count = 1;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
if (count == index) {
|
||||
return current->data;
|
||||
}
|
||||
count++;
|
||||
current = current->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
uint32_t getImageDataSize(DataNode *head, int index){
|
||||
int count = 1;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
if (count == index) {
|
||||
return current->dataLength;
|
||||
}
|
||||
count++;
|
||||
current = current->next;
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct DataNode DataNode;
|
||||
|
||||
DataNode* splitData(unsigned char *buffer, uint32_t bufferSize);
|
||||
|
||||
void freeDataNodes(DataNode *head);
|
||||
|
||||
void printDataList(DataNode *head);
|
||||
|
||||
int getDataNodeCount(DataNode *head);
|
||||
|
||||
/**
|
||||
* @param index is form 1 to n
|
||||
*/
|
||||
unsigned char* getDataNodeByIndex(DataNode *head, int index);
|
||||
uint32_t getImageDataSize(DataNode *head, int index);
|
@ -0,0 +1,79 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "dag_split_image.h"
|
||||
|
||||
#define MAX_IMG_SZ 8*1025*1024
|
||||
|
||||
int main()
|
||||
{
|
||||
unsigned char *zInpbuf = NULL;
|
||||
|
||||
zInpbuf = malloc(MAX_IMG_SZ);
|
||||
if (!zInpbuf)
|
||||
{
|
||||
perror("malloc");
|
||||
return -1;
|
||||
}
|
||||
ssize_t imgSz = read(0, zInpbuf, MAX_IMG_SZ);
|
||||
if (imgSz <= 0)
|
||||
{
|
||||
perror("read");
|
||||
free(zInpbuf);
|
||||
return -1;
|
||||
}
|
||||
DataNode *dataList = splitData(zInpbuf, imgSz);
|
||||
if (dataList == NULL) {
|
||||
fprintf(stderr, "Failed to split data.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
unsigned char *Imagedata1 = getDataNodeByIndex(dataList, 1);
|
||||
unsigned char *Imagedata2 = getDataNodeByIndex(dataList, 2);
|
||||
|
||||
uint32_t imageSize1 = getImageDataSize(dataList, 1);
|
||||
uint32_t imageSize2 = getImageDataSize(dataList, 2);
|
||||
|
||||
int x, y;
|
||||
FILE *out_bin = stdout;
|
||||
|
||||
for (int i = 0; i < 54; i++)
|
||||
{
|
||||
x = Imagedata1[i];
|
||||
y = (i < imageSize2) ? Imagedata2[i] : x;
|
||||
fwrite(&x, 1, 1, out_bin);
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
unsigned long big_img_offset = 54;
|
||||
unsigned long small_img_offset = 54;
|
||||
|
||||
while (big_img_offset < imageSize1)
|
||||
{
|
||||
if (i == 2400) i = 0;
|
||||
|
||||
x = Imagedata1[big_img_offset++];
|
||||
|
||||
if (i < 300 && small_img_offset < imageSize2)
|
||||
{
|
||||
y = Imagedata2[small_img_offset++];
|
||||
fwrite(&y, 1, 1, out_bin);
|
||||
}
|
||||
else
|
||||
{
|
||||
fwrite(&x, 1, 1, out_bin);
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
while (big_img_offset < imageSize1)
|
||||
{
|
||||
x = Imagedata1[big_img_offset++];
|
||||
fwrite(&x, 1, 1, out_bin);
|
||||
}
|
||||
|
||||
free(zInpbuf);
|
||||
return 0;
|
||||
}
|
@ -1 +1,2 @@
|
||||
sudo chsh -s /bin/bash xiaosuGW
|
||||
sudo chsh -s /bin/bash hai
|
||||
|
||||
|
@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "$0 [perf output file, chain_function_perf.log or single_function_perf.log or opt_function_perf.log]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# != 1 ] ; then
|
||||
usage
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
output=$1
|
||||
|
||||
|
||||
declare project_path="$(
|
||||
cd "$(dirname "$0")/../.."
|
||||
pwd
|
||||
)"
|
||||
echo $project_path
|
||||
path=`pwd`
|
||||
#export SLEDGE_DISABLE_PREEMPTION=true
|
||||
export SLEDGE_CPU_SPEED=2500
|
||||
export SLEDGE_SCHEDULER=FIFO
|
||||
#xport SLEDGE_SIGALRM_HANDLER=BROADCAST
|
||||
#export SLEDGE_SIGALRM_HANDLER=TRIAGED
|
||||
#export SLEDGE_NWORKERS=16
|
||||
#export SLEDGE_SCHEDULER=EDF
|
||||
export SLEDGE_SANDBOX_PERF_LOG=$path/$output
|
||||
echo $SLEDGE_SANDBOX_PERF_LOG
|
||||
cd $project_path/runtime/bin
|
||||
#LD_LIBRARY_PATH="$(pwd):$LD_LIBRARY_PATH" ./sledgert ../tests/test_noop1.json
|
@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "$0 [cpu-log]"
|
||||
exit 1
|
||||
}
|
||||
|
||||
#chmod 400 ./id_rsa
|
||||
#path="/home/weihao/sledge/sledge_tree/runtime/tests"
|
||||
path="/home/njl/sledge/runtime/tests"
|
||||
#test single 5k c5 50% max RPS (480)
|
||||
f1="5k_single_50.txt"
|
||||
server_log_file="execution_single_5k_50.log"
|
||||
$path/start.sh $server_log_file >/dev/null 2>&1 &
|
||||
echo "sledge is running"
|
||||
./test_rps.sh $f1 120 48 5k.jpg 10000 2>&1 &
|
||||
pid1=$!
|
||||
wait $pid1
|
||||
$path/kill_sledge.sh
|
||||
|
||||
|
||||
#test single 5k c5 70% max RPS
|
||||
f1="5k_single_70.txt"
|
||||
server_log_file="execution_single_5k_70.log"
|
||||
$path/start.sh $server_log_file >/dev/null 2>&1 &
|
||||
echo "sledge is running"
|
||||
./test_rps.sh $f1 120 68 5k.jpg 10000 2>&1 &
|
||||
pid1=$!
|
||||
wait $pid1
|
||||
$path/kill_sledge.sh
|
||||
|
||||
#test single 5k c5 99% max RPS
|
||||
f1="5k_single_99.txt"
|
||||
server_log_file="execution_single_5k_99.log"
|
||||
$path/start.sh $server_log_file >/dev/null 2>&1 &
|
||||
echo "sledge is running"
|
||||
./test_rps.sh $f1 120 96 5k.jpg 10000 2>&1 &
|
||||
pid1=$!
|
||||
wait $pid1
|
||||
$path/kill_sledge.sh
|
@ -0,0 +1,122 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1",
|
||||
"path": "work1m_wasm.so",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["reverse1", "resize1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/jpeg"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "reverse1",
|
||||
"path": "reverse_wasm.so",
|
||||
"port": 10001,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["png2bmp1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "resize1",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10002,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["png2bmp2"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10003,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["picinpic1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp2",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10004,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["picinpic1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "picinpic1",
|
||||
"path": "picinpic_wasm.so",
|
||||
"port": 10005,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": ["cifar10_1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp",
|
||||
"tail-module": true
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_1",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10006,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
"tail-module": true
|
||||
},
|
||||
|
@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
|
||||
function usage {
|
||||
echo "Please enter right parameters: current_rps(*5) add_step(*5) duratime"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ $# -ne 3 ]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
echo "current_rps(*5) add_step(*5) duratime"
|
||||
|
||||
#path="/home/njl/sledge/runtime/tests"
|
||||
path="/home/hai/sledge/sledge/runtime/tests"
|
||||
|
||||
current_rps=$1
|
||||
step=$2
|
||||
duratime=$3
|
||||
max_rps=0
|
||||
max_latency=0
|
||||
|
||||
output="hey_test_max_rps.log"
|
||||
server_log_file="test_rps.log"
|
||||
|
||||
|
||||
loop=1
|
||||
|
||||
for loop in {1..5}; do
|
||||
$path/start-edf.sh $server_log_file >/dev/null 2>&1 &
|
||||
echo "sledge is running loop $loop"
|
||||
|
||||
./test_rps.sh $output $duratime $current_rps 5k.jpg 10000 2>&1 &
|
||||
pid1=$!
|
||||
wait $pid1
|
||||
|
||||
$path/kill_sledge.sh
|
||||
latency=$(grep "Requests" $output | awk -F ': ' '{print $2}')
|
||||
|
||||
if (( $(echo "$latency < $max_rps" | bc -l) )); then
|
||||
break
|
||||
fi
|
||||
|
||||
echo "loop_$loop RPS: $latency"
|
||||
max_rps=$latency
|
||||
current_rps=$((current_rps + step))
|
||||
done
|
||||
|
||||
echo "Maximum RPS: $max_rps"
|
||||
|
@ -0,0 +1,88 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "resize1",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["png2bmp1", "lpd_wasm1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10001,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["cifar10_1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "lpd_wasm1",
|
||||
"path": "lpd_wasm.so",
|
||||
"port": 10002,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "text/plain",
|
||||
"tail-module": true
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_1",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10003,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
"tail-module": true
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1",
|
||||
"path": "work3_wasm.so",
|
||||
"port": 10004,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
"tail-module": true
|
||||
},
|
@ -0,0 +1,340 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "resize1",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["png2bmp1", "lpd_wasm1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10001,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["cifar10_1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "lpd_wasm1",
|
||||
"path": "lpd_wasm.so",
|
||||
"port": 10002,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_1",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10003,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1",
|
||||
"path": "work3_wasm.so",
|
||||
"port": 10004,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
|
||||
{
|
||||
"active": true,
|
||||
"name": "resize1_2",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10005,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["png2bmp1_2", "lpd_wasm1_2"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1_2",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10006,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["cifar10_2"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "lpd_wasm1_2",
|
||||
"path": "lpd_wasm.so",
|
||||
"port": 10007,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_2"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_2",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10008,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_2"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1_2",
|
||||
"path": "work3_wasm.so",
|
||||
"port": 10009,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain"
|
||||
},{
|
||||
"active": true,
|
||||
"name": "resize1_3",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10010,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["png2bmp1_3", "lpd_wasm1_3"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1_3",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10011,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["cifar10_3"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "lpd_wasm1_3",
|
||||
"path": "lpd_wasm.so",
|
||||
"port": 10012,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_3"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_3",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10013,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_3"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1_3",
|
||||
"path": "work3_wasm.so",
|
||||
"port": 10014,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "resize1_4",
|
||||
"path": "resize_wasm.so",
|
||||
"port": 10015,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": ["png2bmp1_4", "lpd_wasm1_4"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/jpeg",
|
||||
"http-req-size": 1024000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024000,
|
||||
"http-resp-content-type": "image/png"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "png2bmp1_4",
|
||||
"path": "C-Image-Manip_wasm.so",
|
||||
"port": 10016,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["cifar10_4"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/png",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "image/bmp"
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "lpd_wasm1_4",
|
||||
"path": "lpd_wasm.so",
|
||||
"port": 10017,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 2,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_4"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 4096000,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "cifar10_4",
|
||||
"path": "cifar10_wasm.so",
|
||||
"port": 10018,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 1,
|
||||
"next_modules": ["work1_4"],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "image/bmp",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
},
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1_4",
|
||||
"path": "work3_wasm.so",
|
||||
"port": 10019,
|
||||
"relative-deadline-us": 16346,
|
||||
"argsize": 1,
|
||||
"priority": 1,
|
||||
"pre_module_count": 2,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 4096000,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1024,
|
||||
"http-resp-content-type": "text/plain",
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "noop1",
|
||||
"path": "noop_wasm.so",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 0,
|
||||
"argsize": 0,
|
||||
"priority": 1,
|
||||
"pre_module_count": 0,
|
||||
"next_modules": [],
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 0,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 0,
|
||||
"http-resp-content-type": "text/plain",
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"active": true,
|
||||
"name": "work1k",
|
||||
"path": "work1k_wasm.so",
|
||||
"port": 10000,
|
||||
"relative-deadline-us": 50000,
|
||||
"argsize": 1,
|
||||
"http-req-headers": [],
|
||||
"http-req-content-type": "text/plain",
|
||||
"http-req-size": 1200,
|
||||
"http-resp-headers": [],
|
||||
"http-resp-size": 1200,
|
||||
"http-resp-content-type": "text/plain"
|
||||
}
|
@ -0,0 +1,99 @@
|
||||
#include "dag_data_split.h"
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct DataNode {
|
||||
uint32_t dataLength;
|
||||
char *data;
|
||||
struct DataNode *next;
|
||||
};
|
||||
|
||||
DataNode* splitData(char *buffer, uint32_t bufferSize) {
|
||||
DataNode *head = NULL;
|
||||
DataNode *tail = NULL;
|
||||
uint32_t offset = 0;
|
||||
|
||||
while (offset < bufferSize) {
|
||||
if (offset + 4 > bufferSize) {
|
||||
break;
|
||||
}
|
||||
|
||||
uint32_t dataLength = *(uint32_t *)(buffer + offset);
|
||||
offset += 4;
|
||||
|
||||
if (offset + dataLength > bufferSize) {
|
||||
break;
|
||||
}
|
||||
|
||||
DataNode *newNode = (DataNode *)malloc(sizeof(DataNode));
|
||||
if (newNode == NULL) {
|
||||
perror("Memory allocation failed");
|
||||
freeDataNodes(head);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
newNode->data = (char *)malloc(dataLength);
|
||||
if (newNode->data == NULL) {
|
||||
free(newNode);
|
||||
perror("Memory allocation failed");
|
||||
freeDataNodes(head);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(newNode->data, buffer + offset, dataLength);
|
||||
newNode->dataLength = dataLength;
|
||||
newNode->next = NULL;
|
||||
|
||||
if (head == NULL) {
|
||||
head = newNode;
|
||||
} else {
|
||||
tail->next = newNode;
|
||||
}
|
||||
tail = newNode;
|
||||
|
||||
offset += dataLength;
|
||||
}
|
||||
return head;
|
||||
}
|
||||
|
||||
void freeDataNodes(DataNode *head) {
|
||||
while (head != NULL) {
|
||||
DataNode *next = head->next;
|
||||
free(head->data);
|
||||
free(head);
|
||||
head = next;
|
||||
}
|
||||
}
|
||||
|
||||
void printDataList(DataNode *head) {
|
||||
int index = 0;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
printf("Data %d: Length = %u\n", index, current->dataLength);
|
||||
index++;
|
||||
current = current->next;
|
||||
}
|
||||
}
|
||||
|
||||
int getDataNodeCount(DataNode *head) {
|
||||
int count = 0;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
count++;
|
||||
current = current->next;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
const char* getDataNodeByIndex(DataNode *head, int index) {
|
||||
int count = 1;
|
||||
DataNode *current = head;
|
||||
while (current != NULL) {
|
||||
if (count == index) {
|
||||
return current->data;
|
||||
}
|
||||
count++;
|
||||
current = current->next;
|
||||
}
|
||||
return NULL;
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct DataNode DataNode;
|
||||
|
||||
DataNode* splitData(char *buffer, uint32_t bufferSize);
|
||||
|
||||
void freeDataNodes(DataNode *head);
|
||||
|
||||
void printDataList(DataNode *head);
|
||||
|
||||
int getDataNodeCount(DataNode *head);
|
||||
|
||||
/**
|
||||
* @param index is form 1 to n
|
||||
*/
|
||||
const char* getDataNodeByIndex(DataNode *head, int index);
|
@ -0,0 +1,48 @@
|
||||
#include <unistd.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "dag_data_split.h"
|
||||
|
||||
#define MAX_BUF (1024 * 1024 * 1) // 1m
|
||||
|
||||
int main() {
|
||||
char *d = malloc(MAX_BUF + 1);
|
||||
ssize_t bytes_read = read(0, d, MAX_BUF);
|
||||
if (bytes_read < 0) {
|
||||
perror("Error reading input");
|
||||
return 1;
|
||||
}
|
||||
|
||||
DataNode *dataList = splitData(d, bytes_read);
|
||||
if (dataList == NULL) {
|
||||
fprintf(stderr, "Failed to split data.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
const char *firstdata = getDataNodeByIndex(dataList, 1); // Assume this is text data
|
||||
const char *seconddata = getDataNodeByIndex(dataList, 2); // Assume this is image data
|
||||
|
||||
if (firstdata == NULL || seconddata == NULL) {
|
||||
fprintf(stderr, "Not enough data.\n");
|
||||
freeDataNodes(dataList);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Prepare output string for the text data
|
||||
// char output[1024];
|
||||
// int len = snprintf(output, sizeof(output), "First data: %s\n", firstdata);
|
||||
printf("the fistdata %s", firstdata);
|
||||
|
||||
// Output the text data
|
||||
free(d);
|
||||
|
||||
// Assuming seconddata contains image data in raw binary form.
|
||||
// Directly write image data to stdout.
|
||||
// write(1, seconddata, strlen(seconddata));
|
||||
|
||||
freeDataNodes(dataList);
|
||||
|
||||
return 0;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,28 @@
|
||||
Runtime Environment:
|
||||
CPU Speed: 2400 MHz
|
||||
Processor Speed: 2400 MHz
|
||||
RLIMIT_DATA: Infinite
|
||||
RLIMIT_NOFILE: 1048576
|
||||
Core Count: 8
|
||||
Listener core ID: 1
|
||||
First Worker core ID: 2
|
||||
Worker core count: 6
|
||||
Scheduler Policy: MDL
|
||||
Sigalrm Policy: BROADCAST
|
||||
Preemption: Enabled
|
||||
Quantum: 5000 us
|
||||
Sandbox Performance Log: /home/hai/sledge/sledge/runtime/tests/runtime_sandbox_perf_log.log
|
||||
Starting listener thread
|
||||
Listener core thread: 7ffff7a006c0
|
||||
Starting 6 worker thread(s)
|
||||
C: 01, T: 0x7ffff7bfdd80, F: runtime_start_runtime_worker_threads>
|
||||
Sandboxing environment ready!
|
||||
|
||||
C: 01, T: 0x7ffff7bfdd80, F: module_new>
|
||||
Stack Size: 524288
|
||||
C: 01, T: 0x7ffff7bfdd80, F: module_new>
|
||||
Stack Size: 524288
|
||||
C: 01, T: 0x7ffff7bfdd80, F: module_new>
|
||||
Stack Size: 524288
|
||||
C: 01, T: 0x7ffff7bfdd80, F: module_new>
|
||||
Stack Size: 524288
|
Loading…
Reference in new issue