perfsonar-dev - perfsonar: r2728 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma ma/ui/panels plugins test test/ma ui/panels
Subject: perfsonar development work
List archive
perfsonar: r2728 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma ma/ui/panels plugins test test/ma ui/panels
Chronological Thread
- From:
- To:
- Subject: perfsonar: r2728 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma ma/ui/panels plugins test test/ma ui/panels
- Date: Mon, 27 Aug 2007 07:23:30 -0400
Author: nina
Date: 2007-08-27 07:23:30 -0400 (Mon, 27 Aug 2007)
New Revision: 2728
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSCountsDatum.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSDiscardsDatum.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSErrorsDatum.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSUtilizationDatum.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/SmartMARequestTest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/UserDataTest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
Log:
updates for error/discards visualization
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Discards.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -53,4 +53,7 @@
return new PSDiscardsDatum();
}
+ protected int[] getDirections() {
+ return new int[]{UserData.DIRECTION_OUTPUT};
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_Errors.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -32,9 +32,11 @@
import org.perfsonar.perfsonarui.AbstractUserData;
import org.perfsonar.perfsonarui.UnsupportedTypeException;
import org.perfsonar.perfsonarui.plugins.ITimeValueResponse;
+import org.perfsonar.perfsonarui.plugins.MetaDataList;
import org.perfsonar.perfsonarui.plugins.PSCountsDatum;
import org.perfsonar.perfsonarui.plugins.PSErrorsDatum;
import org.perfsonar.perfsonarui.plugins.PSTime;
+import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
@@ -109,6 +111,9 @@
timeValueResponse.setUserData(userData);
timeValueResponse.initializeResponse();
NodeList datum =
((org.w3c.dom.Element)data).getElementsByTagNameNS(URI_perfsonar[perfsonar_version][1],"datum");
+ if (datum.getLength() == 0)
+ datum =
((org.w3c.dom.Element)data).getElementsByTagNameNS(URI_nmwg[nmwg_version],"datum");
+
for (int i=0; i < datum.getLength();i++) {
Node n = datum.item(i);
@@ -132,7 +137,9 @@
//result code
NodeList datum =
((org.w3c.dom.Element)data).getElementsByTagNameNS(URI_perfsonar[perfsonar_version][1],"datum");
-
+ if (datum.getLength()==0)
+ datum =
((org.w3c.dom.Element)data).getElementsByTagNameNS(URI_nmwg[nmwg_version],"datum");
+
if (datum.getLength()>0) {
long counts = 0;
PSCountsDatum d = createCountsDatum();
@@ -155,7 +162,7 @@
}
- userData.setResponse(d.getType(), Long.toString(counts));
+ userData.setResponse(d.getType(), Double.toString(counts));
}
processResultCode(data, userData);
}
@@ -203,4 +210,9 @@
d.setValue(value, units);
t.setValue(time,timeType);
}
+
+ @Override
+ protected int[] getDirections() {
+ return new int[]{UserData.DIRECTION_INPUT};
+ }
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/MARequest_NMWG2.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -129,7 +129,9 @@
}
-
+ protected int[] getDirections() {
+ return new int[] {UserData.DIRECTION_INPUT,UserData.DIRECTION_OUTPUT};
+ }
/**
*
@@ -146,10 +148,17 @@
MesgElem.addNamespaceDeclaration(select);
if (userData.direction == UserData.DIRECTION_UNKNOWN) {
+ int[] directions = getDirections();
+ for (int i=0; i < directions.length;i++) {
+ userData.setDirection(directions[i]);
+ createSetupDataMetaData(userData,
MesgElem,UserData.C_DIRECTIONS[i]);
+ }
+ /*
userData.setDirection(UserData.DIRECTION_INPUT);
createSetupDataMetaData(userData,
MesgElem,UserData.C_DIRECTION_IN);
userData.setDirection(UserData.DIRECTION_OUTPUT);
createSetupDataMetaData(userData,
MesgElem,UserData.C_DIRECTION_OUT);
+ */
userData.setDirection(UserData.DIRECTION_UNKNOWN);
} else createSetupDataMetaData(userData,
MesgElem,userData.getQuery(UserData.C_DIRECTION));
@@ -176,10 +185,17 @@
for (int i=0; i < dataList.size();i++) {
UserData userData = (UserData)dataList.get(i);
if (userData.direction == UserData.DIRECTION_UNKNOWN) {
+ int[] directions = getDirections();
+ for (int d=0; d < directions.length;d++) {
+ userData.setDirection(directions[d]);
+ createSetupDataMetaData(userData,
MesgElem,Integer.toString(i)+UserData.C_DIRECTIONS[d]);
+ }
+ /*
userData.setDirection(UserData.DIRECTION_INPUT);
createSetupDataMetaData(userData,
MesgElem,Integer.toString(i)+UserData.C_DIRECTION_IN);
userData.setDirection(UserData.DIRECTION_OUTPUT);
createSetupDataMetaData(userData,
MesgElem,Integer.toString(i)+UserData.C_DIRECTION_OUT);
+ */
userData.setDirection(UserData.DIRECTION_UNKNOWN);
} else createSetupDataMetaData(userData,
MesgElem,Integer.toString(i)+userData.getQuery(UserData.C_DIRECTION));
}
@@ -471,15 +487,21 @@
ParamIntElem2.setText(userData.getEndTime(AbstractUserData.ID_QUERY));
ParamElem.addContent(ParamIntElem2);
- Element ParamIntElem4 = new Element(E_PARAMETER,
selectParams);
-
ParamIntElem4.setAttribute(E_PARAMETERNAME,E_CONSOLIDATIONFUNCTION);
-
ParamIntElem4.setText(userData.getConsolidationFunc(AbstractUserData.ID_QUERY));
- ParamElem.addContent(ParamIntElem4);
+ String consolidation =
userData.getConsolidationFunc(AbstractUserData.ID_QUERY);
+ if (!AbstractUserData.NULL_DATA.equals(consolidation)) {
+ Element ParamIntElem4 = new Element(E_PARAMETER,
selectParams);
+
ParamIntElem4.setAttribute(E_PARAMETERNAME,E_CONSOLIDATIONFUNCTION);
+ ParamIntElem4.setText(consolidation);
+ ParamElem.addContent(ParamIntElem4);
+ }
- Element ParamIntElem5 = new Element(E_PARAMETER,
selectParams);
- ParamIntElem5.setAttribute(E_PARAMETERNAME,E_RESOLUTION);
-
ParamIntElem5.setText(userData.getResolution(AbstractUserData.ID_QUERY));
- ParamElem.addContent(ParamIntElem5);
+ String resolution =
userData.getResolution(AbstractUserData.ID_QUERY);
+ if (!AbstractUserData.NULL_DATA.equals(resolution)) {
+ Element ParamIntElem5 = new Element(E_PARAMETER,
selectParams);
+
ParamIntElem5.setAttribute(E_PARAMETERNAME,E_RESOLUTION);
+ ParamIntElem5.setText(resolution);
+ ParamElem.addContent(ParamIntElem5);
+ }
return MetElem;
Modified: branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
2007-08-27 10:50:10 UTC (rev 2727)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/UserData.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -40,8 +40,11 @@
public final static String C_IFNAME = "ifName";
public final static String C_IFADDRESS = "ifAddress";
public final static String C_DIRECTION="direction";
+ public final static String[] C_DIRECTIONS={"in","out"};
+ /*
public final static String C_DIRECTION_IN="in";
public final static String C_DIRECTION_OUT="out";
+ */
public final static String C_IFDESCRIPTION = "ifDescription";
public final static String C_CAPACITY="capacity";
public final static String C_TIMEVALUE="timeValue";
@@ -156,8 +159,6 @@
setQuery(names[INDEX_EVENTTYPE],"utilization");
setTime(timeNow-24*60*60, 24*60*60);
- //data[5][1] = Long.toString(timeNow-24*60*60);
//"1132587600";
- //data[6][1] = Long.toString(timeNow); //"1132767300";
setQuery(names[INDEX_CONSOLIDATION],"AVERAGE");
setQuery(names[INDEX_RESOLUTION],"300");
@@ -496,8 +497,8 @@
}
public synchronized void setDirection(String input) {
- if (input.equals(C_DIRECTION_IN)) setDirection(DIRECTION_INPUT);
- else if (input.equals(C_DIRECTION_OUT))
setDirection(DIRECTION_OUTPUT);
+ if (input.equals(C_DIRECTIONS[DIRECTION_INPUT]))
setDirection(DIRECTION_INPUT);
+ else if (input.equals(C_DIRECTIONS[DIRECTION_OUTPUT]))
setDirection(DIRECTION_OUTPUT);
else setDirection(DIRECTION_UNKNOWN);
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ma/ui/panels/MAResponseChartPanel.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -117,12 +117,13 @@
bitAxis.setTickMarksVisible(true);
NumberAxis countAxis = new NumberAxis("Input Errors / Output Drops")
{
+
/**
- *
- */
- private static final long serialVersionUID = -8247407792580685L;
+ *
+ */
+ private static final long serialVersionUID =
8599170403106496529L;
- @Override
+ @Override
public void autoAdjustRange() {
super.autoAdjustRange();
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSCountsDatum.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSCountsDatum.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSCountsDatum.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -33,7 +33,7 @@
public abstract class PSCountsDatum extends PSDatum {
- protected long value = 0;
+ protected double value = 0;
public PSCountsDatum() {
super();
@@ -44,16 +44,22 @@
}
@Override
public void setValue(String value) throws UnsupportedTypeException {
+ NaN = false;
if (isDefaultType)
try {
- this.value = Math.round(Double.parseDouble(value));
+ this.value = Double.parseDouble(value);
+ NaN = Double.isNaN(this.value);
+
+ } catch (NumberFormatException e) {
+ this.value = Double.NaN;
+ NaN = true;
} catch (Exception x) {
throw new UnsupportedTypeException(null,value,x);
}
else throw new UnsupportedTypeException(null,"Don't know how to
convert " +type+" to " + getDefaultType() ,null);
}
- public long getCount() {
+ public double getCount() {
return value;
}
@Override
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSDiscardsDatum.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSDiscardsDatum.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSDiscardsDatum.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -41,15 +41,12 @@
}
/**
* To overcome current pionier implementation
- */
+
protected ArrayList<String> initSupportedTypes() {
ArrayList<String> l = super.initSupportedTypes();
l.add("Bps");
return l;
}
- /**
- * To overcome current pionier implementation
- */
@Override
public synchronized String getType() {
return getDefaultType();
@@ -60,15 +57,19 @@
try {
double d = Double.parseDouble(value);
if (Double.isNaN(d)) {
- this.value = 0;
+ this.value = Double.NaN;
NaN = true;
}
else {
this.value = Math.round(d);
NaN = false;
}
+ } catch (NumberFormatException x) {
+ this.value = Double.NaN;
+ NaN = true;
} catch (Exception x) {
throw new UnsupportedTypeException(null,value,x);
}
- }
+ }
+ */
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSErrorsDatum.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSErrorsDatum.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSErrorsDatum.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -29,11 +29,8 @@
package org.perfsonar.perfsonarui.plugins;
-import java.util.ArrayList;
-import org.perfsonar.perfsonarui.UnsupportedTypeException;
-
public class PSErrorsDatum extends PSCountsDatum {
@Override
public String getDefaultType() {
@@ -41,7 +38,7 @@
}
/**
* To overcome current pionier implementation
- */
+
protected ArrayList<String> initSupportedTypes() {
ArrayList<String> l = super.initSupportedTypes();
l.add("Bps");
@@ -56,17 +53,22 @@
@Override
public void setValue(String value) throws UnsupportedTypeException {
try {
- double d = Double.parseDouble(value);
+ double d = Double.parseDouble(value.toUpperCase());
if (Double.isNaN(d)) {
- this.value = 0;
+ this.value = Double.NaN;
NaN = true;
}
else {
this.value = Math.round(d);
NaN = false;
+ System.out.println(value);
}
+ } catch (NumberFormatException e) {
+ this.value = 0;
+ NaN = true;
} catch (Exception x) {
throw new UnsupportedTypeException(null,value,x);
}
}
+ */
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSUtilizationDatum.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSUtilizationDatum.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/plugins/PSUtilizationDatum.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -54,11 +54,14 @@
public void setValue(String value) throws UnsupportedTypeException {
try {
if (units_Bps.equals(getType()))
- this.value = Long.parseLong(value)*8;
+ this.value = Double.parseDouble(value)*8;
else if (units_bps.equals(getType()))
- this.value = Long.parseLong(value);
+ this.value = Double.parseDouble(value);
else
throw new UnsupportedTypeException(null,getType(),null);
+ } catch (NumberFormatException x) {
+ this.value = Double.NaN;
+
} catch (Exception x) {
throw new UnsupportedTypeException(null,getType(),x);
}
@@ -70,7 +73,7 @@
else super.setType(type);
}
public long getBits() {
- return value;
+ return Math.round(value);
}
public void setBits(long bits) {
value = bits;
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/SmartMARequestTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/SmartMARequestTest.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/SmartMARequestTest.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -117,12 +117,12 @@
assertEquals("Gi0/0",
ud.getResponse(UserData.C_IFNAME));
ResponseData response = new ResponseData();
//ud.setQuery(UserData.C_DIRECTION, "out");
- ud.setDirection(UserData.C_DIRECTION_OUT);
+
ud.setDirection(UserData.C_DIRECTIONS[UserData.DIRECTION_OUTPUT]);
//smartRequest.makeRequest(ud, response);
ud.makeQueryFromResponse();
- ud.setDirection(UserData.C_DIRECTION_OUT);
+
ud.setDirection(UserData.C_DIRECTIONS[UserData.DIRECTION_OUTPUT]);
long time = System.currentTimeMillis()/1000 -
60*24;
ud.setTime(time,60*24);
smartRequest.makeRequest( ud,
IPerfsonarRequest.MA_SetupDataRequest, new
TimeValueResponseListener(response), false);
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/UserDataTest.java
===================================================================
--- branches/perfsonarui/src/org/perfsonar/perfsonarui/test/UserDataTest.java
2007-08-27 10:50:10 UTC (rev 2727)
+++ branches/perfsonarui/src/org/perfsonar/perfsonarui/test/UserDataTest.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -248,7 +248,7 @@
*/
public void testSetOctets() {
UserData u = new UserData();
- u.setResponse(UserData.C_DIRECTION_IN, "in");
+
u.setResponse(UserData.C_DIRECTIONS[UserData.DIRECTION_INPUT], "in");
u.setResponse(UserData.C_CAPACITY, "10000");
u.setOctets(5000);
System.out.println(u.getMBitsInInt());
@@ -290,7 +290,7 @@
u.setResponse(UserData.C_IFDESCRIPTION, "nina.acad.bg");
assertEquals("nina.acad.bg",u.getIfDescr(AbstractUserData.ID_RESPONSE));
- u.setResponse(UserData.C_DIRECTION, UserData.C_DIRECTION_IN);
+ u.setResponse(UserData.C_DIRECTION,
UserData.C_DIRECTIONS[UserData.DIRECTION_INPUT]);
assertTrue(u.isInput());
}
@@ -343,7 +343,7 @@
*/
public void testSetInput() {
UserData u = new UserData();
- u.setResponse(UserData.C_DIRECTION, UserData.C_DIRECTION_IN);
+ u.setResponse(UserData.C_DIRECTION,
UserData.C_DIRECTIONS[UserData.DIRECTION_INPUT]);
assertTrue(u.isInput());
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/test/ma/MARequest_ErrorsTest.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -84,7 +84,7 @@
uData.setEndpoint(e);
uData.setQuery(UserData.C_IFADDRESS, "192.168.0.202");
uData.setQuery(UserData.C_IFNAME, "eth0");
- uData.setDirection(UserData.C_DIRECTION_IN);
+ uData.setDirection(UserData.C_DIRECTIONS[UserData.DIRECTION_INPUT]);
assertEquals("eth0",uData.getIfName(AbstractUserData.ID_QUERY));
try {
@@ -153,7 +153,7 @@
uData.setEndpoint(e);
uData.setQuery(UserData.C_IFADDRESS, "192.168.0.202");
uData.setQuery(UserData.C_IFNAME, "eth0");
- uData.setDirection(UserData.C_DIRECTION_IN);
+ uData.setDirection(UserData.C_DIRECTIONS[UserData.DIRECTION_INPUT]);
uData.setStartTime(1000);
uData.setEndTime(2000);
@@ -255,31 +255,10 @@
" </select:parameters>\n"+
" </nmwg:metadata>\n"+
" <nmwg:data id=\"data_0in\" metadataIdRef=\"m_param_0in\"/>\n"+
- " <nmwg:metadata id=\"meta_0out\">\n"+
+ " <nmwg:metadata id=\"meta_1in\">\n"+
" <errors:subject id=\"subject_3\">\n"+
" <nmwgt:interface>\n"+
" <nmwgt:ifName>eth0</nmwgt:ifName>\n"+
- " <nmwgt:ifAddress
type=\"ipv4\">192.168.0.202</nmwgt:ifAddress>\n"+
- " <nmwgt:direction>out</nmwgt:direction>\n"+
- " </nmwgt:interface>\n"+
- " </errors:subject>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>\n"+
- " </nmwg:metadata>\n"+
- " <nmwg:metadata id=\"m_param_0out\">\n"+
- " <select:subject id=\"subject1_4\"
metadataIdRef=\"meta_0out\"/>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/ops/select/2.0</nmwg:eventType>\n"+
- " <select:parameters id=\"param_5\">\n"+
- " <nmwg:parameter
name=\"startTime\">1000</nmwg:parameter>\n"+
- " <nmwg:parameter name=\"endTime\">2000</nmwg:parameter>\n"+
- " <nmwg:parameter
name=\"consolidationFunction\">AVERAGE</nmwg:parameter>\n"+
- " <nmwg:parameter
name=\"resolution\">300</nmwg:parameter>\n"+
- " </select:parameters>\n"+
- " </nmwg:metadata>\n"+
- " <nmwg:data id=\"data_0out\"
metadataIdRef=\"m_param_0out\"/>\n"+
- " <nmwg:metadata id=\"meta_1in\">\n"+
- " <errors:subject id=\"subject_5\">\n"+
- " <nmwgt:interface>\n"+
- " <nmwgt:ifName>eth0</nmwgt:ifName>\n"+
" <nmwgt:ifAddress
type=\"ipv4\">192.168.0.203</nmwgt:ifAddress>\n"+
" <nmwgt:direction>in</nmwgt:direction>\n"+
" </nmwgt:interface>\n"+
@@ -287,9 +266,9 @@
"
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>\n"+
" </nmwg:metadata>\n"+
" <nmwg:metadata id=\"m_param_1in\">\n"+
- " <select:subject id=\"subject1_6\"
metadataIdRef=\"meta_1in\"/>\n"+
+ " <select:subject id=\"subject1_4\"
metadataIdRef=\"meta_1in\"/>\n"+
"
<nmwg:eventType>http://ggf.org/ns/nmwg/ops/select/2.0</nmwg:eventType>\n"+
- " <select:parameters id=\"param_7\">\n"+
+ " <select:parameters id=\"param_5\">\n"+
" <nmwg:parameter
name=\"startTime\">1000</nmwg:parameter>\n"+
" <nmwg:parameter name=\"endTime\">2000</nmwg:parameter>\n"+
" <nmwg:parameter
name=\"consolidationFunction\">AVERAGE</nmwg:parameter>\n"+
@@ -297,27 +276,6 @@
" </select:parameters>\n"+
" </nmwg:metadata>\n"+
" <nmwg:data id=\"data_1in\" metadataIdRef=\"m_param_1in\"/>\n"+
- " <nmwg:metadata id=\"meta_1out\">\n"+
- " <errors:subject id=\"subject_7\">\n"+
- " <nmwgt:interface>\n"+
- " <nmwgt:ifName>eth0</nmwgt:ifName>\n"+
- " <nmwgt:ifAddress
type=\"ipv4\">192.168.0.203</nmwgt:ifAddress>\n"+
- " <nmwgt:direction>out</nmwgt:direction>\n"+
- " </nmwgt:interface>\n"+
- " </errors:subject>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/errors/2.0</nmwg:eventType>\n"+
- " </nmwg:metadata>\n"+
- " <nmwg:metadata id=\"m_param_1out\">\n"+
- " <select:subject id=\"subject1_8\"
metadataIdRef=\"meta_1out\"/>\n"+
- "
<nmwg:eventType>http://ggf.org/ns/nmwg/ops/select/2.0</nmwg:eventType>\n"+
- " <select:parameters id=\"param_9\">\n"+
- " <nmwg:parameter
name=\"startTime\">1000</nmwg:parameter>\n"+
- " <nmwg:parameter name=\"endTime\">2000</nmwg:parameter>\n"+
- " <nmwg:parameter
name=\"consolidationFunction\">AVERAGE</nmwg:parameter>\n"+
- " <nmwg:parameter
name=\"resolution\">300</nmwg:parameter>\n"+
- " </select:parameters>\n"+
- " </nmwg:metadata>\n"+
- " <nmwg:data id=\"data_1out\"
metadataIdRef=\"m_param_1out\"/>\n"+
"</nmwg:message>\n";
assertEquals(request,AbstractMARequest.document2string(doc));
} catch (Exception x) {
@@ -356,7 +314,7 @@
System.out.print(uData);
assertEquals("192.168.0.203",uData.getResponse("ifAddress"));
- assertEquals(6,Long.parseLong(uData.getResponse("Eps")));
+
assertEquals(6.0,Double.parseDouble(uData.getResponse("Eps")),1E-10);
System.out.println();
} catch (Exception x) {
x.printStackTrace();
@@ -416,9 +374,9 @@
*/
System.out.println(list.get(0));
System.out.println(list.get(1));
- assertEquals("20000000003",list.get(0).getResponse("Eps"));
+
assertEquals(20000000003.0,Double.parseDouble(list.get(0).getResponse("Eps")),1E-10);
- assertEquals("6",list.get(1).getResponse("Eps"));
+
assertEquals(6,Double.parseDouble(list.get(1).getResponse("Eps")),1E-10);
} catch (Exception x) {
fail(x.getMessage());
}
Modified:
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
===================================================================
---
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
2007-08-27 10:50:10 UTC (rev 2727)
+++
branches/perfsonarui/src/org/perfsonar/perfsonarui/ui/panels/PerfsonarTimeSeries.java
2007-08-27 11:23:30 UTC (rev 2728)
@@ -97,7 +97,7 @@
else {
double d = datum.getValue().doubleValue();
if (Double.isNaN(d)) series.add(dtime, null);
- else series.add(dtime, Math.round(d));
+ else series.add(dtime,d);
}
- perfsonar: r2728 - in branches/perfsonarui/src/org/perfsonar/perfsonarui: ma ma/ui/panels plugins test test/ma ui/panels, svnlog, 08/27/2007
Archive powered by MHonArc 2.6.16.