Lines Matching refs:avg
46 bkt.avg = 150; in test_leak_bucket()
52 g_assert(bkt.avg == 150); in test_leak_bucket()
58 g_assert(bkt.avg == 150); in test_leak_bucket()
64 g_assert(bkt.avg == 150); in test_leak_bucket()
95 bkt.avg = 0; in test_compute_wait()
102 bkt.avg = 150; in test_compute_wait()
109 bkt.avg = 150; in test_compute_wait()
116 bkt.avg = 150; in test_compute_wait()
127 bkt.avg = 10; in test_compute_wait()
136 g_assert(double_cmp(bkt.level, (i + 1) * (bkt.max - bkt.avg) / 10.0)); in test_compute_wait()
179 g_assert(!ts.cfg.buckets[i].avg); in test_init()
211 g_assert(!ts.cfg.buckets[i].avg); in test_init_readonly()
243 g_assert(!ts.cfg.buckets[i].avg); in test_init_writeonly()
269 orig_cfg.buckets[THROTTLE_BPS_TOTAL].avg = 153; in test_config_functions()
270 orig_cfg.buckets[THROTTLE_BPS_READ].avg = 56; in test_config_functions()
271 orig_cfg.buckets[THROTTLE_BPS_WRITE].avg = 1; in test_config_functions()
273 orig_cfg.buckets[THROTTLE_OPS_TOTAL].avg = 150; in test_config_functions()
274 orig_cfg.buckets[THROTTLE_OPS_READ].avg = 69; in test_config_functions()
275 orig_cfg.buckets[THROTTLE_OPS_WRITE].avg = 23; in test_config_functions()
310 g_assert(final_cfg.buckets[THROTTLE_BPS_TOTAL].avg == 153); in test_config_functions()
311 g_assert(final_cfg.buckets[THROTTLE_BPS_READ].avg == 56); in test_config_functions()
312 g_assert(final_cfg.buckets[THROTTLE_BPS_WRITE].avg == 1); in test_config_functions()
314 g_assert(final_cfg.buckets[THROTTLE_OPS_TOTAL].avg == 150); in test_config_functions()
315 g_assert(final_cfg.buckets[THROTTLE_OPS_READ].avg == 69); in test_config_functions()
316 g_assert(final_cfg.buckets[THROTTLE_OPS_WRITE].avg == 23); in test_config_functions()
340 cfg.buckets[index].avg = MAX(cfg.buckets[index].avg, 1); in set_cfg_value()
342 cfg.buckets[index].avg = value; in set_cfg_value()
459 b->avg = 0; in test_ranges()
464 b->avg = 1; in test_ranges()
467 b->avg = THROTTLE_VALUE_MAX; in test_ranges()
470 b->avg = THROTTLE_VALUE_MAX; in test_ranges()
475 b->avg = THROTTLE_VALUE_MAX + 1; in test_ranges()
478 b->avg = THROTTLE_VALUE_MAX; in test_ranges()
483 b->avg = 1; in test_ranges()
488 b->avg = 1; in test_ranges()
493 b->avg = 1; in test_ranges()
498 b->avg = 1; in test_ranges()
504 b->avg = 1; in test_ranges()
509 b->avg = 1; in test_ranges()
514 b->avg = 1; in test_ranges()
519 b->avg = 1; in test_ranges()
533 cfg.buckets[i].avg = 0; in test_max_is_missing_limit()
537 cfg.buckets[i].avg = 0; in test_max_is_missing_limit()
541 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
545 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
549 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
609 double avg, /* io limit */ in do_test_accounting() argument
628 cfg.buckets[index].avg = avg; in do_test_accounting()
775 cfg1.buckets[THROTTLE_BPS_READ].avg = 500000; in test_groups()
776 cfg1.buckets[THROTTLE_BPS_WRITE].avg = 285000; in test_groups()
777 cfg1.buckets[THROTTLE_OPS_READ].avg = 20000; in test_groups()
778 cfg1.buckets[THROTTLE_OPS_WRITE].avg = 12000; in test_groups()
785 cfg2.buckets[THROTTLE_BPS_READ].avg = 4547; in test_groups()
786 cfg2.buckets[THROTTLE_BPS_WRITE].avg = 1349; in test_groups()
787 cfg2.buckets[THROTTLE_OPS_READ].avg = 123; in test_groups()
788 cfg2.buckets[THROTTLE_OPS_WRITE].avg = 86; in test_groups()