r3831 - trunk/varnish-tools/webgui/Varnish

petter at projects.linpro.no petter at projects.linpro.no
Thu Feb 26 14:36:44 CET 2009


Author: petter
Date: 2009-02-26 14:36:44 +0100 (Thu, 26 Feb 2009)
New Revision: 3831

Modified:
   trunk/varnish-tools/webgui/Varnish/Statistics.pm
Log:
$delta_time should never be 0, but just in case...


Modified: trunk/varnish-tools/webgui/Varnish/Statistics.pm
===================================================================
--- trunk/varnish-tools/webgui/Varnish/Statistics.pm	2009-02-26 12:53:28 UTC (rev 3830)
+++ trunk/varnish-tools/webgui/Varnish/Statistics.pm	2009-02-26 13:36:44 UTC (rev 3831)
@@ -159,7 +159,12 @@
 						}
 					}
 					else {
-						$delta_value = ($value - $last_value) / $delta_time;
+						if ($delta_time > 0) {
+							$delta_value = ($value - $last_value) / $delta_time;
+						}
+						else {
+							$delta_value = undef;
+						}
 					}
 
 					$last_value = $value;



More information about the varnish-commit mailing list