dm secu
This commit is contained in:
parent
fbe4f314f9
commit
7ea44045c9
1 changed files with 10 additions and 2 deletions
|
@ -84,9 +84,17 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||
println!("Unique sources: {unique_sources: >14.4}");
|
||||
let unique_dests = destinations.len();
|
||||
println!("Unique destinations: {unique_dests: >14.4}");
|
||||
let most_bytes = sources.iter().max_by_key(|(_, (_, bytes))| bytes).map(|(addr, _)| addr);
|
||||
let most_bytes = sources
|
||||
.iter()
|
||||
.max_by_key(|(_, (_, bytes))| bytes)
|
||||
.map(|(addr, _)| format!("{addr:?}"))
|
||||
.unwrap_or_default();
|
||||
println!("Source with most bytes: {most_bytes:?}");
|
||||
let most_packets = sources.iter().max_by_key(|(_, (packs, _))| packs).map(|(addr, _)| addr);
|
||||
let most_packets = sources
|
||||
.iter()
|
||||
.max_by_key(|(_, (packs, _))| packs)
|
||||
.map(|(addr, _)| format!("{addr:?}"))
|
||||
.unwrap_or_default();
|
||||
println!("Source with most packets: {most_packets:?}");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue