Skip to content

Commit

Permalink
mehsh.loss metric
Browse files Browse the repository at this point in the history
  • Loading branch information
timglabisch committed Mar 22, 2022
1 parent bef3c3f commit 141cb35
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ impl AnalyzerEventSubscriberUdpMetric {
let loss = event.req_count - event.resp_count;
let target: SocketAddrV4 = "127.0.0.1:1113".parse()?;

sock.send_to(create_package_sum("mehsh.loss", loss as i32).map_err(|e| anyhow!(e))?.as_slice(), target).await?;
sock.send_to(create_package_sum(format!("mehsh.sendloss.{}", &event.server_from), loss as i32).map_err(|e| anyhow!(e))?.as_slice(), target).await?;
sock.send_to(create_package_sum(format!("mehsh.recvloss.{}", &event.server_to), loss as i32).map_err(|e| anyhow!(e))?.as_slice(), target).await?;

Expand Down

0 comments on commit 141cb35

Please sign in to comment.