Add Benchmark to App. TODO: Test Benchmark at other kernels.
This commit is contained in:
parent
cfa923decf
commit
da410c8529
|
@ -139,7 +139,7 @@ void *run_benchmark(void *args) {
|
|||
init_benchmark_runset(&head);
|
||||
printf("[BENCHMARK] Start Benchmark running.\n");
|
||||
|
||||
case_attr.schedparam.sched_priority = 25;
|
||||
case_attr.schedparam.sched_priority = 30;
|
||||
case_attr.stacksize = 16384;
|
||||
PrivSemaphoreCreate(&syn_sem, 0, -20);
|
||||
PrivMutexCreate(&case_mu, 0);
|
||||
|
@ -153,7 +153,9 @@ void *run_benchmark(void *args) {
|
|||
cur_handle = cur_handle->next;
|
||||
}
|
||||
|
||||
PrivSemaphoreObtainWait(&syn_sem, NULL);
|
||||
struct timespec abstime;
|
||||
abstime.tv_sec = 10;
|
||||
PrivSemaphoreObtainWait(&syn_sem, &abstime);
|
||||
print_result();
|
||||
printf("[BENCHMARK] Global Time Diff: %f, Done: %d\n", global_diff, done_cnt);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue