mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 10:45:30 +00:00
aquatic: when statistics.interval == 0, skip adding to stats atomics
This commit is contained in:
parent
5d2e4412b3
commit
eddd353621
1 changed files with 10 additions and 8 deletions
|
|
@ -206,6 +206,7 @@ fn handle_readable_socket(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if config.statistics.interval != 0 {
|
||||||
state.statistics.requests_received
|
state.statistics.requests_received
|
||||||
.fetch_add(requests_received, Ordering::SeqCst);
|
.fetch_add(requests_received, Ordering::SeqCst);
|
||||||
state.statistics.responses_sent
|
state.statistics.responses_sent
|
||||||
|
|
@ -214,4 +215,5 @@ fn handle_readable_socket(
|
||||||
.fetch_add(bytes_received, Ordering::SeqCst);
|
.fetch_add(bytes_received, Ordering::SeqCst);
|
||||||
state.statistics.bytes_sent
|
state.statistics.bytes_sent
|
||||||
.fetch_add(bytes_sent, Ordering::SeqCst);
|
.fetch_add(bytes_sent, Ordering::SeqCst);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue