add benchmark to app. TODO: test benchmark.

This commit is contained in:
TXuian 2022-12-07 15:48:54 +08:00
parent 4f0c2d23d5
commit 260be1073f
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,7 @@ void organize_result(const benchmark_handle *handle) {
while (bmh_list[i].handle != NULL) { while (bmh_list[i].handle != NULL) {
if (bmh_list[i].handle == handle) { if (bmh_list[i].handle == handle) {
bmh_list[i].time = tmp_diff; bmh_list[i].time = tmp_diff;
printf("[BENCHMARK] TaskName: %s\n", bmh_list[i].name);
break; break;
} }
i++; i++;
@ -108,6 +109,7 @@ int run_benchmark() {
int correct; int correct;
init_benchmark_runset(); init_benchmark_runset();
printf("[BENCHMARK] Start Benchmark running.\n");
benchmark_handle *cur_handle = get_benchmark_list()->next; benchmark_handle *cur_handle = get_benchmark_list()->next;
while (NULL != cur_handle) { while (NULL != cur_handle) {