Add Benchmark Sequential
This commit is contained in:
parent
2978604f54
commit
0672a44fd2
|
@ -2,6 +2,7 @@
|
|||
#define _BENCHMARK_H_
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <support.h>
|
||||
#include <time.h>
|
||||
#include <transform.h>
|
||||
|
@ -132,12 +133,14 @@ void *run_benchmark_parallel(void *args) {
|
|||
done_cnt = 0;
|
||||
volatile int result;
|
||||
int correct;
|
||||
// CPU_MHZ = *(int *)args;
|
||||
|
||||
benchmark_handle head = {
|
||||
.handle.magic_number = MAGIC_NUMBER,
|
||||
.next = NULL,
|
||||
};
|
||||
init_benchmark_runset(&head);
|
||||
print_result();
|
||||
printf("[BENCHMARK] Start Benchmark running parallel.\n");
|
||||
|
||||
case_attr.schedparam.sched_priority = 30;
|
||||
|
@ -171,6 +174,7 @@ void *run_benchmark_sequential(void *args) {
|
|||
.next = NULL,
|
||||
};
|
||||
init_benchmark_runset(&head);
|
||||
print_result();
|
||||
printf("[BENCHMARK] Start Benchmark running sequential.\n");
|
||||
benchmark_handle *cur_handle = head.next;
|
||||
while (NULL != cur_handle) {
|
||||
|
@ -195,7 +199,7 @@ void *run_benchmark_sequential(void *args) {
|
|||
printf("[BENCHMARK] Global Time Diff: %f\n", global_diff);
|
||||
}
|
||||
|
||||
static int embenchmark_parallel(void) {
|
||||
static int embenchmark_parallel(int argc, char *argv[]) {
|
||||
run_benchmark_parallel(NULL);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
#include <stddef.h>
|
||||
#include <transform.h>
|
||||
|
||||
#define CPU_MHZ 500
|
||||
#define CPU_MHZ 10
|
||||
// int CPU_MHZ = 500;
|
||||
|
||||
/* Benchmarks must implement verify_benchmark, which must return -1 if no
|
||||
verification is done. */
|
||||
|
|
Loading…
Reference in New Issue