Files

18 lines
541 B
Plaintext

Token bucket: 20 tokens/second, burst 5, fake clock
===================================================
10 sends requested at the same instant (t = 0):
send 1 waits 0 ms
send 2 waits 0 ms
send 3 waits 0 ms
send 4 waits 0 ms
send 5 waits 0 ms
send 6 waits 50 ms
send 7 waits 100 ms
send 8 waits 150 ms
send 9 waits 200 ms
send 10 waits 250 ms
After the queue drains and the clock idles for 10 seconds the bucket refills, but only to the burst size:
next 7 sends wait (ms): [0, 0, 0, 0, 0, 50, 100]