diff --git a/runtime/include/sandbox_functions.h b/runtime/include/sandbox_functions.h index 2cd35cb..d3fdbc4 100644 --- a/runtime/include/sandbox_functions.h +++ b/runtime/include/sandbox_functions.h @@ -183,4 +183,5 @@ sandbox_print_perf(struct sandbox *sandbox) sandbox->module->name, sandbox->module->port, sandbox_state_stringify(sandbox->state), sandbox->module->relative_deadline_us, total_time_us, queued_us, initializing_us, runnable_us, running_us, blocked_us, returned_us, sandbox->linear_memory_size); + fflush(runtime_sandbox_perf_log); } diff --git a/runtime/src/current_sandbox.c b/runtime/src/current_sandbox.c index 28666bb..c93ebc0 100644 --- a/runtime/src/current_sandbox.c +++ b/runtime/src/current_sandbox.c @@ -114,7 +114,9 @@ current_sandbox_start(void) next_module->name, sandbox->client_socket_descriptor, (const struct sockaddr *)&sandbox->client_address, sandbox->request_arrival_timestamp, true, pre_func_output, output_length); - /* Add to the Global Sandbox Request Scheduler */ + /* reset the request id to the same as the current request id */ + sandbox_request->id = sandbox->id; + /* Add to the Global Sandbox Request Scheduler */ global_request_scheduler_add(sandbox_request); sandbox_remove_from_epoll(sandbox); sandbox_set_as_returned(sandbox, SANDBOX_RUNNING); diff --git a/runtime/src/main.c b/runtime/src/main.c index e2101ce..0729edf 100644 --- a/runtime/src/main.c +++ b/runtime/src/main.c @@ -226,6 +226,7 @@ runtime_configure() if (runtime_sandbox_perf_log == NULL) { perror("sandbox perf log"); } fprintf(runtime_sandbox_perf_log, "id,function,state,deadline,actual,queued,initializing,runnable," "running,blocked,returned,memory\n"); + fflush(runtime_sandbox_perf_log); } else { printf("\tSandbox Performance Log: Disabled\n"); }