From 255c4905e6e47e33efb02fd21bef0c1dc156f213 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 20 Nov 2019 23:40:21 +0900 Subject: [PATCH] Only count STREAM data as bytes_total --- src/h2load_quic.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/h2load_quic.cc b/src/h2load_quic.cc index 2a9b3952..d81ca340 100644 --- a/src/h2load_quic.cc +++ b/src/h2load_quic.cc @@ -114,6 +114,10 @@ int recv_stream_data(ngtcp2_conn *conn, int64_t stream_id, int fin, int Client::quic_recv_stream_data(int64_t stream_id, int fin, const uint8_t *data, size_t datalen) { + if (worker->current_phase == Phase::MAIN_DURATION) { + worker->stats.bytes_total += datalen; + } + auto s = static_cast(session.get()); auto nconsumed = s->read_stream(stream_id, data, datalen, fin); if (nconsumed == -1) {