Increment counter by number of packets received (#1049)

So that we can see the total packets/s
This commit is contained in:
sakridge 2018-08-23 12:32:50 -07:00 committed by GitHub
parent d4c41219f9
commit cabe80b129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ impl Packets {
trace!("receiving on {}", socket.local_addr().unwrap());
match socket.recv_from(&mut p.data) {
Err(_) if i > 0 => {
inc_new_counter_info!("packets-recv_count", 1);
inc_new_counter_info!("packets-recv_count", i);
debug!("got {:?} messages on {}", i, socket.local_addr().unwrap());
break;
}