MCPcopy Index your code
hub / github.com/RT-Thread/rt-thread / main

Function main

examples/test/avl.c:555–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555int main(int argc, char *argv[])
556{
557 if (argc == 2)
558 {
559 rt_sscanf(argv[1], "%d", &loop_count);
560 }
561 else
562 {
563 loop_count = 1000;
564 }
565
566 puts("Benchmark");
567 printf("looping times: %d\n", loop_count);
568
569 init_test();
570 int endurance;
571 STOPWATCH(insert_test, endurance);
572 printf("Insertion: %d ms\n", endurance);
573
574 randomize(dataset, loop_count);
575 STOPWATCH(search_test, endurance);
576 printf("Search: %d ms\n", endurance);
577
578 randomize(dataset, loop_count);
579 STOPWATCH(delete_test, endurance);
580 printf("Delete: %d ms\n", endurance);
581
582 cleanup();
583 puts("Benchmark exit");
584 return 0;
585}

Callers

nothing calls this directly

Calls 6

rt_sscanfFunction · 0.85
init_testFunction · 0.85
randomizeFunction · 0.85
cleanupFunction · 0.85
putsFunction · 0.50
printfFunction · 0.50

Tested by

no test coverage detected