Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Monitoring Report Interval for low allowable_throughput_failure_interval_seconds #451

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions source/connection_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion tests/py_localhost/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down