From 67f6a0fe072477bd4095560da40e57e881be177b Mon Sep 17 00:00:00 2001 From: Joshua Kissoon Date: Wed, 7 May 2014 09:46:48 +0530 Subject: [PATCH] Statistician - Added a method to find average content lookup route length --- src/kademlia/Statistician.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/kademlia/Statistician.java b/src/kademlia/Statistician.java index 2875d7b..ed270ae 100644 --- a/src/kademlia/Statistician.java +++ b/src/kademlia/Statistician.java @@ -115,4 +115,9 @@ public class Statistician { return this.totalContentLookupTime / this.numContentLookups; } + + public double averageContentLookupRouteLength() + { + return (double) ((double) this.totalRouteLength / (double) this.numContentLookups); + } }