statistics.c 1.1 KB

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