From 400c86f2add58127ebbc8df71a2138fc2a8051c2 Mon Sep 17 00:00:00 2001 From: auron_x Date: Wed, 15 Nov 2006 16:58:04 +0000 Subject: [PATCH] *) fixed possible div by zero git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2960 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/PerformanceSearch_p.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htroot/PerformanceSearch_p.java b/htroot/PerformanceSearch_p.java index 9c4881e48..4c1fa75d7 100644 --- a/htroot/PerformanceSearch_p.java +++ b/htroot/PerformanceSearch_p.java @@ -115,7 +115,7 @@ public class PerformanceSearch_p { } else { t = se.getLocalTiming().getYieldTime(sequence); prop.put("latestLocalTimeAbs_" + sequence, (t < 0) ? "-" : Long.toString(t)); - prop.put("latestLocalTimeRel_" + sequence, ((t < 0) ? 0 : (t * 100 / time)) + "%"); + prop.put("latestLocalTimeRel_" + sequence, ((t < 0 || time == 0) ? 0 : (t * 100 / time)) + "%"); c = se.getLocalTiming().getYieldCount(sequence); prop.put("latestLocalCountAbs_" + sequence, (c < 0) ? "-" : Integer.toString(c)); }