Lines Matching refs:nsamples
185 unsigned int nsamples) in compute_threshold() argument
191 return (400 + 2 * monotonic_resolution + slack_per_scall) * nsamples in compute_threshold()
192 + 3000/nsamples; in compute_threshold()
200 static unsigned int compute_discard(unsigned int nsamples) in compute_discard() argument
202 if (nsamples == 1) in compute_discard()
205 return MAX(1u, nsamples / 20); in compute_discard()
254 void do_timer_test(long long usec, unsigned int nsamples) in do_timer_test() argument
257 unsigned int discard = compute_discard(nsamples); in do_timer_test()
258 unsigned int keep_samples = nsamples - discard; in do_timer_test()
265 scall, usec, nsamples, 1.00 * threshold / (keep_samples)); in do_timer_test()
268 for (i = 0; i < (int)nsamples; i++) { in do_timer_test()
275 qsort(samples, nsamples, sizeof(samples[0]), cmp); in do_timer_test()
279 for (i = 0; samples[i] > 10 * usec && i < (int)nsamples; i++) { in do_timer_test()
289 for (i = nsamples - 1; samples[i] < usec && i > -1; i--); in do_timer_test()
291 if (i < (int)nsamples - 1) { in do_timer_test()
293 scall, nsamples - 1 - i, in do_timer_test()
294 samples[i+1], samples[nsamples-1]); in do_timer_test()
298 median = samples[nsamples/2]; in do_timer_test()
302 for (i = discard; i < (int)nsamples; i++) in do_timer_test()
307 samples[nsamples-1], samples[0], median, in do_timer_test()
313 } else if (trunc_mean > (nsamples - discard) * usec + threshold) { in do_timer_test()