chore: demonstrate priority

main
Sean McBride 5 years ago
parent 61c7ccea0c
commit 4d29585236

@ -0,0 +1,88 @@
#!/bin/sh
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "45" | http :10000 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &
echo "25" | http :10001 --timeout 100 &

@ -43,7 +43,7 @@ sandbox_request_allocate(struct module *module, char *arguments, int socket_desc
sandbox_request->absolute_deadline = start_time + module->relative_deadline_us * runtime_processor_speed_MHz; sandbox_request->absolute_deadline = start_time + module->relative_deadline_us * runtime_processor_speed_MHz;
// TODO: Refactor to log file // TODO: Refactor to log file
printf("Set absolute deadline of %lu\n", sandbox_request->absolute_deadline); // printf("Set absolute deadline of %lu\n", sandbox_request->absolute_deadline);
debuglog("[%p: %s]\n", sandbox_request, sandbox_request->module->name); debuglog("[%p: %s]\n", sandbox_request, sandbox_request->module->name);
return sandbox_request; return sandbox_request;

@ -142,14 +142,15 @@ done:
u64 end_time = __getcycles(); u64 end_time = __getcycles();
curr->total_time = end_time - curr->start_time; curr->total_time = end_time - curr->start_time;
// TODO: Refactor to log file // TODO: Refactor to log file
printf("Function returned in %lu cycles\n", curr->total_time); printf("%s():%d, %d, %lu\n", curr->module->name, curr->module->port, curr->module->relative_deadline_us,
if (end_time < curr->absolute_deadline) { (uint64_t)(curr->total_time / runtime_processor_speed_MHz));
printf("Deadline Met with %f us to spare\n", // if (end_time < curr->absolute_deadline) {
(curr->absolute_deadline - end_time) / runtime_processor_speed_MHz); // printf("meadDeadline Met with %f us to spare\n",
} else { // (curr->absolute_deadline - end_time) / runtime_processor_speed_MHz);
printf("Deadline NOT MET! Overran by %f us\n", // } else {
(end_time - curr->absolute_deadline) / runtime_processor_speed_MHz); // printf("Deadline NOT MET! Overran by %f us\n",
} // (end_time - curr->absolute_deadline) / runtime_processor_speed_MHz);
// }
#ifndef USE_HTTP_UVIO #ifndef USE_HTTP_UVIO
int r = send(curr->client_socket_descriptor, curr->request_response_data, sndsz, 0); int r = send(curr->client_socket_descriptor, curr->request_response_data, sndsz, 0);

@ -0,0 +1,28 @@
{
"active": "yes",
"name": "fibonacci",
"path": "fibonacci_wasm.so",
"port": 10000,
"relative-deadline-us": 50000,
"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": "fibonacci2",
"path": "fibonacci_wasm.so",
"port": 10001,
"relative-deadline-us": 10000,
"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…
Cancel
Save