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
pull/1/head
orbiter 16 years ago
parent 9e4db75aac
commit 9cb68353da

@ -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;

@ -1761,7 +1761,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
indexedPages++;
// update profiling info
if (System.currentTimeMillis() - lastPPMUpdate > 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<IndexingStack.
}
public int currentPPM() {
return serverProfiling.countEvents("indexed", 30000) * 2;
return serverProfiling.countEvents("indexed", 20000) * 3;
}
public void updateMySeed() {

@ -87,7 +87,7 @@ public class serverProfiling extends Thread {
history.add(new Event(eventPayload));
// clean up too old entries
while (history.size() > 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();

Loading…
Cancel
Save