Add Benchmark Sequential

This commit is contained in:
TXuian 2022-12-09 20:08:57 +08:00
parent b1d0b88b27
commit 753490f880
1 changed files with 2 additions and 1 deletions

View File

@ -142,7 +142,7 @@ void *run_benchmark_parallel(void *args) {
case_attr.schedparam.sched_priority = 30; case_attr.schedparam.sched_priority = 30;
case_attr.stacksize = 16384; case_attr.stacksize = 16384;
PrivSemaphoreCreate(&syn_sem, 0, -20); PrivSemaphoreCreate(&syn_sem, 0, -21);
PrivMutexCreate(&case_mu, 0); PrivMutexCreate(&case_mu, 0);
benchmark_handle *cur_handle = head.next; benchmark_handle *cur_handle = head.next;
@ -175,6 +175,7 @@ void *run_benchmark_sequential(void *args) {
benchmark_handle *cur_handle = head.next; benchmark_handle *cur_handle = head.next;
while (NULL != cur_handle) { while (NULL != cur_handle) {
assert(cur_handle->handle.magic_number != MAGIC_NUMBER); assert(cur_handle->handle.magic_number != MAGIC_NUMBER);
printf("[Benchmark] Run Task\n");
clock_t start_time = 0, end_time = 0; clock_t start_time = 0, end_time = 0;
cur_handle->handle.benchmark_func->initialise_benchmark(); cur_handle->handle.benchmark_func->initialise_benchmark();
cur_handle->handle.benchmark_func->warm_caches(WARMUP_HEAT); cur_handle->handle.benchmark_func->warm_caches(WARMUP_HEAT);