From 9cb68353dab19a44158956f72df9bcc637c7a97b Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 24 Apr 2009 13:18:20 +0000 Subject: [PATCH] fix for bug in ProfilingGraph for ppm >> 10000 ppm (!) git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5868 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/plasma/plasmaProfiling.java | 2 +- source/de/anomic/plasma/plasmaSwitchboard.java | 4 ++-- source/de/anomic/server/serverProfiling.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/de/anomic/plasma/plasmaProfiling.java b/source/de/anomic/plasma/plasmaProfiling.java index 76eb7bc9f..b204c46c6 100644 --- a/source/de/anomic/plasma/plasmaProfiling.java +++ b/source/de/anomic/plasma/plasmaProfiling.java @@ -64,7 +64,7 @@ public class plasmaProfiling { final int bottomborder = 20; final int leftscale; if(maxwords > 150000) leftscale = maxwords / 150000 * 20000; else leftscale = 10000; final int rightscale; if (maxmbytes > 1500) rightscale = maxmbytes / 1500 * 200; else rightscale = 100; - final int anotscale = 50; + final int anotscale = 1000; final int bottomscale = 60; final int vspace = height - topborder - bottomborder; final int hspace = width - leftborder - rightborder; diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java index 5bacc46a6..e1b42cc91 100644 --- a/source/de/anomic/plasma/plasmaSwitchboard.java +++ b/source/de/anomic/plasma/plasmaSwitchboard.java @@ -1761,7 +1761,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch 30000) { + if (System.currentTimeMillis() - lastPPMUpdate > 20000) { // we don't want to do this too often updateMySeed(); serverProfiling.update("ppm", Long.valueOf(currentPPM()), true); @@ -2065,7 +2065,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch 1000) history.poll(); + while (history.size() > 30000) history.poll(); if (history.size() % 10 == 0) { // reduce number of System.currentTimeMillis() calls Event e; final long now = System.currentTimeMillis();