Debian Codegraph @

crt/aws-c-http/source/statistics.c

raw symbols SCIP
1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/http/statistics.h>
7
8 int aws_crt_statistics_http1_channel_init(struct aws_crt_statistics_http1_channel *stats) {
9 AWS_ZERO_STRUCT(*stats);
10 stats->category = AWSCRT_STAT_CAT_HTTP1_CHANNEL;
11
12 return AWS_OP_SUCCESS;
13 }
14
15 void aws_crt_statistics_http1_channel_cleanup(struct aws_crt_statistics_http1_channel *stats) {
16 (void)stats;
17 }
18
19 void aws_crt_statistics_http1_channel_reset(struct aws_crt_statistics_http1_channel *stats) {
20 stats->pending_outgoing_stream_ms = 0;
21 stats->pending_incoming_stream_ms = 0;
22 stats->current_outgoing_stream_id = 0;
23 stats->current_incoming_stream_id = 0;
24 }
25
26 void aws_crt_statistics_http2_channel_init(struct aws_crt_statistics_http2_channel *stats) {
27 AWS_ZERO_STRUCT(*stats);
28 stats->category = AWSCRT_STAT_CAT_HTTP2_CHANNEL;
29 }
30
31 void aws_crt_statistics_http2_channel_reset(struct aws_crt_statistics_http2_channel *stats) {
32 stats->pending_outgoing_stream_ms = 0;
33 stats->pending_incoming_stream_ms = 0;
34 stats->was_inactive = false;
35 }