Home | History | Annotate | Download | only in micro_bench

Lines Matching refs:avg

139 static inline double computeRunningAvg(double avg, double running_avg, size_t cur_idx) {
140 return (running_avg / (cur_idx + 1)) * cur_idx + (avg / (cur_idx + 1));
143 static inline double computeRunningSquareAvg(double avg, double square_avg, size_t cur_idx) {
144 return (square_avg / (cur_idx + 1)) * cur_idx + (avg / (cur_idx + 1)) * avg;
151 static inline void printIter(uint64_t time_ns, const char *name, size_t size, size_t copies, double avg) {
153 name, copies, size, (double)time_ns/NS_PER_SEC, avg/1024.0);
185 static void inline printColdIter(uint64_t time_ns, const char *name, size_t size, size_t copies, size_t num_buffers, double avg) {
187 name, copies, num_buffers, size, (double)time_ns/NS_PER_SEC, avg/1024.0);
204 double avg; \
209 avg = COMPUTE_AVG; \
211 running_avg = computeRunningAvg(avg, running_avg, i); \
212 square_avg = computeRunningSquareAvg(avg, square_avg, i); \
213 if (min == 0.0 || avg < min) { \
214 min = avg; \
216 if (avg > max) { \
217 max = avg; \
236 printIter(time_ns, name, size, copies, avg), \
263 printColdIter(time_ns, name, size, copies, num_buffers, avg), \
385 printf("sleep(%d) took %.06f seconds\n", delay, avg);,