From 05288557c18b0b4b8fb64923ba5fe1ef381c40fe Mon Sep 17 00:00:00 2001 From: otter Date: Sun, 8 May 2016 20:17:18 +0200 Subject: [PATCH] optimized for small y values --- .gitignore | 3 ++- htroot/NetworkHistory.java | 4 +--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 563e2030e..c3784b619 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ lib/yacy-cora.jar /winDATA.bkp/ /DATA.cloud/ yacy.log -/target/ \ No newline at end of file +/target/ +.project diff --git a/htroot/NetworkHistory.java b/htroot/NetworkHistory.java index 4d92b5c32..da7833f97 100644 --- a/htroot/NetworkHistory.java +++ b/htroot/NetworkHistory.java @@ -97,7 +97,6 @@ public class NetworkHistory { if (v != null && v.longValue() > 0) minpeers = Math.min(minpeers, (int) v.longValue()); } } - ConcurrentLog.warn("NetworkHistory", "min:"+minpeers+" max:"+maxpeers); if (minpeers == Integer.MAX_VALUE) minpeers=0; // no values if (minpeers < 0) { ConcurrentLog.warn("NetworkHistory", "Negative value in plot. columns:"+columns); @@ -109,8 +108,7 @@ public class NetworkHistory { int scale=(int)Math.pow(10, order); minpeers=(minpeers/scale)*scale; maxpeers=((maxpeers/scale)+1)*scale; - if ((maxpeers-minpeers)/scale < 3) scale=Math.max(1,scale/2); - ConcurrentLog.warn("NetworkHistory", "min:"+minpeers+" max:"+maxpeers+" order:"+order+" scale:"+scale); + if ((maxpeers-minpeers)/scale < 3) scale=Math.max(5,scale/2); final int leftborder = 30; final int rightborder = 10; final int width = post.getInt("width", 768 + leftborder + rightborder);