add benchmark to app. TODO: test benchmark.
This commit is contained in:
parent
e3e27d9de9
commit
fed2304578
|
@ -52,12 +52,12 @@ BenchmarkPair bmh_list[] = {
|
|||
// {.handle = &primecount_handle, .name = "primecount", .time = 0}, //
|
||||
// {.handle = &qrtest_handle, .name = "qrtest", .time = 0}, //
|
||||
// {.handle = &combined_handle, .name = "combined", .time = 0}, //
|
||||
// {.handle = &slre_handle, .name = "slre", .time = 0}, //
|
||||
// {.handle = &libst_handle, .name = "libst", .time = 0}, //
|
||||
// {.handle = &statemate_handle, .name = "statemate", .time = 0}, //
|
||||
// {.handle = &tarfind_handle, .name = "tarfind", .time = 0}, //
|
||||
// {.handle = &libud_handle, .name = "libud", .time = 0}, //
|
||||
// {.handle = &libwikisort_handle, .name = "libwikisort", .time = 0}, //
|
||||
{.handle = &slre_handle, .name = "slre", .time = 0}, //
|
||||
{.handle = &libst_handle, .name = "libst", .time = 0}, //
|
||||
{.handle = &statemate_handle, .name = "statemate", .time = 0}, //
|
||||
{.handle = &tarfind_handle, .name = "tarfind", .time = 0}, //
|
||||
{.handle = &libud_handle, .name = "libud", .time = 0}, //
|
||||
{.handle = &libwikisort_handle, .name = "libwikisort", .time = 0}, //
|
||||
{.handle = NULL, .name = "", .time = 0}, //
|
||||
};
|
||||
|
||||
|
@ -66,7 +66,6 @@ float benchmark_time[25];
|
|||
extern benchmark_handle *get_benchmark_list();
|
||||
extern void add_benchmark_handle(benchmark_handle *head, benchmark_handle *);
|
||||
|
||||
int store_idx = 0;
|
||||
float tmp_diff = 0.0;
|
||||
|
||||
float global_diff = 0.0;
|
||||
|
@ -79,6 +78,7 @@ void init_benchmark_runset(benchmark_handle *head) {
|
|||
while (bmh_list[i].handle != NULL) {
|
||||
add_benchmark_handle(head, bmh_list[i++].handle);
|
||||
}
|
||||
global_diff = 0;
|
||||
}
|
||||
void organize_result(const benchmark_handle *handle) {
|
||||
tmp_diff = (float)(end_time - start_time) / TICK_PER_SECOND;
|
||||
|
|
Loading…
Reference in New Issue