From 4a7a6efe7cc924f94b205f8625b0858c3e8e0d89 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 23 Aug 2023 22:48:53 +0000 Subject: [PATCH 1/2] fix report interval --- source/connection_monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/connection_monitor.c b/source/connection_monitor.c index 273232551..5a78b71a5 100644 --- a/source/connection_monitor.c +++ b/source/connection_monitor.c @@ -188,8 +188,10 @@ static void s_destroy(struct aws_crt_statistics_handler *handler) { static uint64_t s_get_report_interval_ms(struct aws_crt_statistics_handler *handler) { (void)handler; - - return 1000; + struct aws_statistics_handler_http_connection_monitor_impl *impl = handler->impl; + uint64_t allowable_throughput_failure_interval_ms = aws_timestamp_convert( + impl->options.allowable_throughput_failure_interval_seconds, AWS_TIMESTAMP_SECS, AWS_TIMESTAMP_MILLIS, NULL); + return aws_min_u64(1000, allowable_throughput_failure_interval_ms / 3); } static struct aws_crt_statistics_handler_vtable s_http_connection_monitor_vtable = { From 6ff41a92be1e9ea89002d160d764698323688c2a Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Mon, 28 Aug 2023 12:35:08 -0700 Subject: [PATCH 2/2] increase sleep --- tests/py_localhost/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/py_localhost/server.py b/tests/py_localhost/server.py index 3bdfc4c3f..825438025 100644 --- a/tests/py_localhost/server.py +++ b/tests/py_localhost/server.py @@ -268,7 +268,7 @@ async def send_slow_repeat_data(self, length, stream_id): try: # Sleep for a sec to make the out bytes per second slower than the expected - time.sleep(1) + time.sleep(2) self.conn.send_data( stream_id, data,