Lines Matching refs:buckets

43     bkt = cfg.buckets[THROTTLE_BPS_TOTAL];  in test_leak_bucket()
92 bkt = cfg.buckets[THROTTLE_BPS_TOTAL]; in test_compute_wait()
179 g_assert(!ts.cfg.buckets[i].avg); in test_init()
180 g_assert(!ts.cfg.buckets[i].max); in test_init()
181 g_assert(!ts.cfg.buckets[i].level); in test_init()
211 g_assert(!ts.cfg.buckets[i].avg); in test_init_readonly()
212 g_assert(!ts.cfg.buckets[i].max); in test_init_readonly()
213 g_assert(!ts.cfg.buckets[i].level); in test_init_readonly()
243 g_assert(!ts.cfg.buckets[i].avg); in test_init_writeonly()
244 g_assert(!ts.cfg.buckets[i].max); in test_init_writeonly()
245 g_assert(!ts.cfg.buckets[i].level); 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()
277 orig_cfg.buckets[THROTTLE_BPS_TOTAL].max = 0; in test_config_functions()
278 orig_cfg.buckets[THROTTLE_BPS_READ].max = 56; in test_config_functions()
279 orig_cfg.buckets[THROTTLE_BPS_WRITE].max = 120; in test_config_functions()
281 orig_cfg.buckets[THROTTLE_OPS_TOTAL].max = 150; in test_config_functions()
282 orig_cfg.buckets[THROTTLE_OPS_READ].max = 400; in test_config_functions()
283 orig_cfg.buckets[THROTTLE_OPS_WRITE].max = 500; in test_config_functions()
285 orig_cfg.buckets[THROTTLE_BPS_TOTAL].level = 45; in test_config_functions()
286 orig_cfg.buckets[THROTTLE_BPS_READ].level = 65; in test_config_functions()
287 orig_cfg.buckets[THROTTLE_BPS_WRITE].level = 23; in test_config_functions()
289 orig_cfg.buckets[THROTTLE_OPS_TOTAL].level = 1; in test_config_functions()
290 orig_cfg.buckets[THROTTLE_OPS_READ].level = 90; in test_config_functions()
291 orig_cfg.buckets[THROTTLE_OPS_WRITE].level = 75; 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()
318 g_assert(final_cfg.buckets[THROTTLE_BPS_TOTAL].max == 0); in test_config_functions()
319 g_assert(final_cfg.buckets[THROTTLE_BPS_READ].max == 56); in test_config_functions()
320 g_assert(final_cfg.buckets[THROTTLE_BPS_WRITE].max == 120); in test_config_functions()
322 g_assert(final_cfg.buckets[THROTTLE_OPS_TOTAL].max == 150); in test_config_functions()
323 g_assert(final_cfg.buckets[THROTTLE_OPS_READ].max == 400); in test_config_functions()
324 g_assert(final_cfg.buckets[THROTTLE_OPS_WRITE].max == 500); in test_config_functions()
330 g_assert(!final_cfg.buckets[i].level); in test_config_functions()
338 cfg.buckets[index].max = value; in set_cfg_value()
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()
455 LeakyBucket *b = &cfg.buckets[i]; in test_ranges()
532 cfg.buckets[i].max = 100; in test_max_is_missing_limit()
533 cfg.buckets[i].avg = 0; in test_max_is_missing_limit()
536 cfg.buckets[i].max = 0; in test_max_is_missing_limit()
537 cfg.buckets[i].avg = 0; in test_max_is_missing_limit()
540 cfg.buckets[i].max = 0; in test_max_is_missing_limit()
541 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
544 cfg.buckets[i].max = 30; in test_max_is_missing_limit()
545 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
548 cfg.buckets[i].max = 100; in test_max_is_missing_limit()
549 cfg.buckets[i].avg = 100; in test_max_is_missing_limit()
628 cfg.buckets[index].avg = avg; in do_test_accounting()
645 if (!double_cmp(ts.cfg.buckets[index].level, total_result)) { in do_test_accounting()
651 if (!double_cmp(ts.cfg.buckets[index].level, read_result)) { in do_test_accounting()
657 if (!double_cmp(ts.cfg.buckets[index].level, write_result)) { 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()