Skip to content

Commit

Permalink
fixed formating
Browse files Browse the repository at this point in the history
  • Loading branch information
SeverinAlexB committed Nov 27, 2024
1 parent a488ced commit fd05a52
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions examples/count_ips_close_to_key.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
* Counts all IP addresses around a random target ID and counts the number of hits, each IP gets.
* Counts all IP addresses around a random target ID and counts the number of hits, each IP gets.
* Does this by initializing a new DHT node for each lookups to reach the target from different directions.
*
*
* The result shows how sloppy the lookup algorithms are.
*
*
Prints a histogram with the collected nodes
First column are the buckets indicating the hit rate. 3 .. 12 summerizes the nodes that get hit with a probability of 3 to 12% in each lookup.
Second column indicates the number of nodes that this bucket contains. [19] means 19 nodes got hit with a probability of 3 to 12%.
Expand All @@ -29,7 +29,6 @@ Full example:
75 .. 84 [ 1 ]: ∎
84 .. 93 [ 15 ]: ∎∎∎∎∎∎∎∎∎∎∎∎∎∎∎
*/

use histo::Histogram;
use mainline::{Dht, Id, Node};
use std::{
Expand Down Expand Up @@ -118,7 +117,6 @@ fn main() {
print_histogram(ip_hits, lookup_count);
}


fn print_histogram(hits: HashMap<IpAddr, u16>, lookup_count: usize) {
/*
Expand Down

0 comments on commit fd05a52

Please # to comment.