diff options
author | Stuart Stock <stuart@int08h.com> | 2019-02-10 18:41:44 -0600 |
---|---|---|
committer | Stuart Stock <stuart@int08h.com> | 2019-02-10 18:41:44 -0600 |
commit | 177372f63a33b25a075c4cba446319929950b0f8 (patch) | |
tree | 5f274bf2f4874a6dc66770c71cf1a036432f122f /src/stats/mod.rs | |
parent | 62e6dd64a276dbf8e10cbe6a4111f0cfb98d163f (diff) | |
download | roughenough-177372f63a33b25a075c4cba446319929950b0f8.zip |
initial version of client response mangling
Diffstat (limited to 'src/stats/mod.rs')
-rw-r--r-- | src/stats/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stats/mod.rs b/src/stats/mod.rs index 29e7ad8..ad90bd2 100644 --- a/src/stats/mod.rs +++ b/src/stats/mod.rs @@ -74,7 +74,7 @@ pub trait ServerStats { fn total_unique_clients(&self) -> u64; - fn get_client_stats(&self, addr: &IpAddr) -> Option<&ClientStatEntry>; + fn stats_for_client(&self, addr: &IpAddr) -> Option<&ClientStatEntry>; fn iter(&self) -> Iter<IpAddr, ClientStatEntry>; @@ -131,7 +131,7 @@ mod test { stats.add_response(&ip, 2048); stats.add_response(&ip, 1024); - let entry = stats.get_client_stats(&ip).unwrap(); + let entry = stats.stats_for_client(&ip).unwrap(); assert_eq!(entry.valid_requests, 1); assert_eq!(entry.invalid_requests, 0); assert_eq!(entry.responses_sent, 2); |