)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"bba36dfdd04eb11e0af77fb53558284daa22315f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"4c5d2517_0dc75709","updated":"2022-04-01 03:56:26.000000000","message":"would be very interesting to see how the nuiance of burst after idle works in some benchmarking senarios. Have you run any of those yet.","commit_id":"061a24cd3a78b4b9342696fec031a686f98d98aa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4b5f12f62476acbed6839f2f30c9c54d46a2e559","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"87c3622d_88fa877c","updated":"2022-05-17 22:19:09.000000000","message":"I think this could have just been squashed into the parent.  I\u0027m not sure about disallowing this behavior by default.  When would we ever change it?  Is the really how we want the existing reatelimits to get applied?","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"193b9569d8aeaf4df6f235c7173247acbcd649cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":4,"id":"64035570_28795b0d","updated":"2022-05-17 06:56:44.000000000","message":"It\u0027s a small enhancement that is opt in, I say we just land it!","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"}],"swift/common/utils.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"bba36dfdd04eb11e0af77fb53558284daa22315f","unresolved":true,"context_lines":[{"line_number":3511,"context_line":"        if now - self.running_time \u003e self.rate_buffer_ms:"},{"line_number":3512,"context_line":"            self.running_time \u003d now"},{"line_number":3513,"context_line":"            if self.burst_after_idle:"},{"line_number":3514,"context_line":"                self.running_time -\u003d self.rate_buffer_ms"},{"line_number":3515,"context_line":"        elif self.running_time \u003e now:"},{"line_number":3516,"context_line":"            if block:"},{"line_number":3517,"context_line":"                # Convert diff to a floating point number of seconds and sleep"}],"source_content_type":"text/x-python","patch_set":1,"id":"4cd7d309_e02ff672","line":3514,"updated":"2022-04-01 03:56:26.000000000","message":"Oh OK, so with this new option. If we every get behind by rate_buffer_ms, then instead of a reset, we keep it at max burst delta so we can keep the burst throttle up if things are really starting to lag.\n\nPretty interesting idea. So long as we\u0027re careful that this extra bursting we allow doesn\u0027t make a thundering herd worse. But I guess it\u0027ll just catch to \u0027now\u0027 and then get rate limitted as before.\n\nYeah, interesting new optional behaviour.","commit_id":"061a24cd3a78b4b9342696fec031a686f98d98aa"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"0b5e5da5fe4948b02858c9aa540760ffcec10e8e","unresolved":true,"context_lines":[{"line_number":3511,"context_line":"        if now - self.running_time \u003e self.rate_buffer_ms:"},{"line_number":3512,"context_line":"            self.running_time \u003d now"},{"line_number":3513,"context_line":"            if self.burst_after_idle:"},{"line_number":3514,"context_line":"                self.running_time -\u003d self.rate_buffer_ms"},{"line_number":3515,"context_line":"        elif self.running_time \u003e now:"},{"line_number":3516,"context_line":"            if block:"},{"line_number":3517,"context_line":"                # Convert diff to a floating point number of seconds and sleep"}],"source_content_type":"text/x-python","patch_set":1,"id":"81a83582_86d877fe","line":3514,"in_reply_to":"4cd7d309_e02ff672","updated":"2022-04-04 09:11:27.000000000","message":"I added this optional behaviour so that I could implement something similar to https://review.opendev.org/c/openstack/swift/+/824653 which has a 1 second burst capacity","commit_id":"061a24cd3a78b4b9342696fec031a686f98d98aa"},{"author":{"_account_id":1179,"name":"Clay Gerrard","email":"clay.gerrard@gmail.com","username":"clay-gerrard"},"change_message_id":"4b5f12f62476acbed6839f2f30c9c54d46a2e559","unresolved":true,"context_lines":[{"line_number":3454,"context_line":"    # 1,000 milliseconds \u003d 1 second"},{"line_number":3455,"context_line":"    clock_accuracy \u003d 1000.0"},{"line_number":3456,"context_line":""},{"line_number":3457,"context_line":"    def __init__(self, max_rate, rate_buffer\u003d5, burst_after_idle\u003dFalse,"},{"line_number":3458,"context_line":"                 running_time\u003d0):"},{"line_number":3459,"context_line":"        \"\"\""},{"line_number":3460,"context_line":"        :param max_rate: The maximum rate per second allowed for the process."}],"source_content_type":"text/x-python","patch_set":3,"id":"950862cf_232b644b","line":3457,"updated":"2022-05-17 22:19:09.000000000","message":"I can\u0027t see any good reason this isn\u0027t on by default; tests seem happy","commit_id":"91df801384eba284a759c884863efa3f357c2ed0"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e428cd0d79e7f7ede5e3568d7d91ea4855753c1","unresolved":true,"context_lines":[{"line_number":3454,"context_line":"    # 1,000 milliseconds \u003d 1 second"},{"line_number":3455,"context_line":"    clock_accuracy \u003d 1000.0"},{"line_number":3456,"context_line":""},{"line_number":3457,"context_line":"    def __init__(self, max_rate, rate_buffer\u003d5, burst_after_idle\u003dFalse,"},{"line_number":3458,"context_line":"                 running_time\u003d0):"},{"line_number":3459,"context_line":"        \"\"\""},{"line_number":3460,"context_line":"        :param max_rate: The maximum rate per second allowed for the process."}],"source_content_type":"text/x-python","patch_set":4,"id":"ff815bb7_41fa60b1","line":3457,"range":{"start_line":3457,"start_character":48,"end_line":3457,"end_character":70},"updated":"2022-05-17 06:55:58.000000000","message":"If this tends to work better for us in the future I\u0027d see no problems in changing this default to True.","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"}],"test/unit/common/test_utils.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e428cd0d79e7f7ede5e3568d7d91ea4855753c1","unresolved":false,"context_lines":[{"line_number":5953,"context_line":""},{"line_number":5954,"context_line":"    def test_burst_after_idle(self):"},{"line_number":5955,"context_line":"        grant_times \u003d self._do_test(1, 1, 4, 1, burst_after_idle\u003dTrue)"},{"line_number":5956,"context_line":"        self.assertEqual([4, 4, 5, 6, 7], grant_times)"},{"line_number":5957,"context_line":""},{"line_number":5958,"context_line":"        grant_times \u003d self._do_test(1, 1, 4, 2, burst_after_idle\u003dTrue)"},{"line_number":5959,"context_line":"        self.assertEqual([4, 4, 4, 5, 6], grant_times)"}],"source_content_type":"text/x-python","patch_set":4,"id":"70428b6f_13790f26","line":5956,"updated":"2022-05-17 06:55:58.000000000","message":"I see, it\u0027s 3 seconds behind but we only allow a lag of 1, so we get 2 at 4 and then we\u0027ve caught up so its then 1 a second.","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e428cd0d79e7f7ede5e3568d7d91ea4855753c1","unresolved":false,"context_lines":[{"line_number":5956,"context_line":"        self.assertEqual([4, 4, 5, 6, 7], grant_times)"},{"line_number":5957,"context_line":""},{"line_number":5958,"context_line":"        grant_times \u003d self._do_test(1, 1, 4, 2, burst_after_idle\u003dTrue)"},{"line_number":5959,"context_line":"        self.assertEqual([4, 4, 4, 5, 6], grant_times)"},{"line_number":5960,"context_line":""},{"line_number":5961,"context_line":"        grant_times \u003d self._do_test(1, 0, 4, 3, burst_after_idle\u003dTrue)"},{"line_number":5962,"context_line":"        self.assertEqual([4, 4, 4, 4, 5], grant_times)"}],"source_content_type":"text/x-python","patch_set":4,"id":"8e0f45b9_1fe894ad","line":5959,"updated":"2022-05-17 06:55:58.000000000","message":"Still it\u0027s 3 seconds behind but we now allow a lag of 2 seconds, so we get 3 at 4 (the first, then 2 burst) then it continues.","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e428cd0d79e7f7ede5e3568d7d91ea4855753c1","unresolved":false,"context_lines":[{"line_number":5959,"context_line":"        self.assertEqual([4, 4, 4, 5, 6], grant_times)"},{"line_number":5960,"context_line":""},{"line_number":5961,"context_line":"        grant_times \u003d self._do_test(1, 0, 4, 3, burst_after_idle\u003dTrue)"},{"line_number":5962,"context_line":"        self.assertEqual([4, 4, 4, 4, 5], grant_times)"},{"line_number":5963,"context_line":""},{"line_number":5964,"context_line":"        # running_time \u003d start_time prevents burst on start-up"},{"line_number":5965,"context_line":"        grant_times \u003d self._do_test(1, 4, 4, 3, burst_after_idle\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":4,"id":"4feb2218_e44f12e2","line":5962,"updated":"2022-05-17 06:55:58.000000000","message":"Same for 3.","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"0e428cd0d79e7f7ede5e3568d7d91ea4855753c1","unresolved":false,"context_lines":[{"line_number":5963,"context_line":""},{"line_number":5964,"context_line":"        # running_time \u003d start_time prevents burst on start-up"},{"line_number":5965,"context_line":"        grant_times \u003d self._do_test(1, 4, 4, 3, burst_after_idle\u003dTrue)"},{"line_number":5966,"context_line":"        self.assertEqual([4, 5, 6, 7, 8], grant_times)"},{"line_number":5967,"context_line":""},{"line_number":5968,"context_line":""},{"line_number":5969,"context_line":"class TestRateLimitedIterator(unittest.TestCase):"}],"source_content_type":"text/x-python","patch_set":4,"id":"efec1f67_9c21b4c5","line":5966,"updated":"2022-05-17 06:55:58.000000000","message":"here the start time and running time are the same, so there is no burst to use. Nice!","commit_id":"99a4b9c7e63a8ca6096b3c57abf504183192451d"}]}
