Lines Matching refs:perf

27 typedef rt_err_t (*testcase_function)(rt_perf_t *perf);
49 void rt_perf_start_impl(rt_perf_t *perf, rt_hwtimerval_t *timeout) in rt_perf_start_impl() argument
57 perf->begin_time = rt_perf_get_timer_us(); in rt_perf_start_impl()
60 void rt_perf_stop(rt_perf_t *perf) in rt_perf_stop() argument
62 perf->real_time = rt_perf_get_timer_us() - perf->begin_time; in rt_perf_stop()
64 if(perf->local_modify) perf->local_modify(perf); in rt_perf_stop()
65 if (perf->real_time > perf->max_time) in rt_perf_stop()
67 perf->max_time = perf->real_time; in rt_perf_stop()
70 if (perf->real_time < perf->min_time) in rt_perf_stop()
72 perf->min_time = perf->real_time; in rt_perf_stop()
75 perf->count++; in rt_perf_stop()
76 perf->tot_time += perf->real_time; in rt_perf_stop()
100 void rt_perf_dump( rt_perf_t *perf) in rt_perf_dump() argument
104 if(perf->dump_head) in rt_perf_dump()
108 perf->dump_head = RT_FALSE; in rt_perf_dump()
111 if (perf->count) in rt_perf_dump()
112 perf->avg_time = (double)perf->tot_time / perf->count; in rt_perf_dump()
114 perf->avg_time = 0.0; in rt_perf_dump()
116 rt_sprintf(avg_str, "%u.%04u", GET_INT(perf->avg_time), GET_DECIMALS(perf->avg_time)); in rt_perf_dump()
120 perf->name, in rt_perf_dump()
121 perf->count, in rt_perf_dump()
122 perf->tot_time, in rt_perf_dump()
123 perf->max_time, in rt_perf_dump()
124 perf->min_time, in rt_perf_dump()
128 static void rt_perf_clear(rt_perf_t *perf) in rt_perf_clear() argument
130 perf->local_modify = NULL; in rt_perf_clear()
131 perf->begin_time = 0; in rt_perf_clear()
132 perf->real_time = 0; in rt_perf_clear()
133 perf->tot_time = 0; in rt_perf_clear()
134 perf->max_time = 0; in rt_perf_clear()
135 perf->min_time = RT_UINT32_MAX; in rt_perf_clear()
136 perf->count = 0; in rt_perf_clear()
137 perf->avg_time = 0; in rt_perf_clear()
138 perf->tmp_time = 0; in rt_perf_clear()