*) fixed possible div by zero

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2960 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
auron_x 18 years ago
parent b94ee53958
commit 400c86f2ad

@ -115,7 +115,7 @@ public class PerformanceSearch_p {
} else { } else {
t = se.getLocalTiming().getYieldTime(sequence); t = se.getLocalTiming().getYieldTime(sequence);
prop.put("latestLocalTimeAbs_" + sequence, (t < 0) ? "-" : Long.toString(t)); 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); c = se.getLocalTiming().getYieldCount(sequence);
prop.put("latestLocalCountAbs_" + sequence, (c < 0) ? "-" : Integer.toString(c)); prop.put("latestLocalCountAbs_" + sequence, (c < 0) ? "-" : Integer.toString(c));
} }

Loading…
Cancel
Save