1. let each sandbox in the chain share the same request id. 2. fflush after fprintf

main
xiaosuGW 3 years ago
parent b2385f70a0
commit cc51da253a

@ -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);
}

@ -114,6 +114,8 @@ 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);
/* 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);

@ -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");
}

Loading…
Cancel
Save