perfsonar-dev - perfsonar: r2481 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
Subject: perfsonar development work
List archive
perfsonar: r2481 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2481 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels
- Date: Sun, 1 Jul 2007 08:51:02 -0400
Author: nina
Date: 2007-07-01 08:51:00 -0400 (Sun, 01 Jul 2007)
New Revision: 2481
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/InterfaceUtilizationSeries.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeriesDelay.java
Log:
Fix to draw NULL value (instead of zero) if the value received is NaN
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/InterfaceUtilizationSeries.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/InterfaceUtilizationSeries.java
2007-06-29 14:39:03 UTC (rev 2480)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/InterfaceUtilizationSeries.java
2007-07-01 12:51:00 UTC (rev 2481)
@@ -75,13 +75,16 @@
}
try {
double d = Double.parseDouble(value);
- series.add(dtime, Math.round(8*d/1048576));
+ if (Double.isNaN(d)) series.add(dtime, null);
+ else
+ series.add(dtime, Math.round(8*d/1048576));
/*
if ((units == null) || ("".equals(units)) ||
("unknown".equals(units)) || ("Bps".equals(units)))
series.add(dtime, Math.round(8*d/1048576));
else series.add(dtime, Math.round(d/1048576));
*/
} catch (NumberFormatException x) {
+ System.out.println(value);
series.add(dtime, null);
}
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
2007-06-29 14:39:03 UTC (rev 2480)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
2007-07-01 12:51:00 UTC (rev 2481)
@@ -90,7 +90,8 @@
try {
double dtime = Double.parseDouble(time)*1000;
double d = Double.parseDouble(value);
- series.add(dtime, Math.round(d));
+ if (Double.isNaN(d)) series.add(dtime, null);
+ else series.add(dtime, Math.round(d));
} catch (NumberFormatException x) {
logger.warn(x);
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeriesDelay.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeriesDelay.java
2007-06-29 14:39:03 UTC (rev 2480)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeriesDelay.java
2007-07-01 12:51:00 UTC (rev 2481)
@@ -45,8 +45,10 @@
try {
double dtime = Double.parseDouble(time)*1000;
double d = Double.parseDouble(value)*1000;
- series.add(dtime, d); //Math.round(this.value));
+ if (Double.isNaN(d)) series.add(dtime, null);
+ else series.add(dtime, d); //Math.round(this.value));
} catch (NumberFormatException x) {
+
logger.warn(x);
}
}
- perfsonar: r2481 - branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels, svnlog, 07/01/2007
Archive powered by MHonArc 2.6.16.