PDA

View Full Version : graphing problem with multiple node XML data and unix timestamps



craig2005
4 Sep 2012, 9:04 AM
Does anyone have any idea on how to graph this? I've tried a whole bunch of ways but I can't figure it out.

Just trying to graph one of them in the chart and not all of them has been a struggle. The timestamp is another issue. I googled around and found some solutions, but couldn't get them to work.



<script type="text/javascript">
Ext.require('Ext.chart.*');
Ext.require(['Ext.Window', 'Ext.fx.target.Sprite', 'Ext.layout.container.Fit', 'Ext.window.MessageBox']);
var chart;
Ext.onReady(function () {

Ext.define('model-jvm', {
extend : 'Ext.data.Model',
fields : [{name:'@timestamp', dateFormat:'timestamp'}, '@avg', '@min', '@max', '@sum', '@count']
});


// create the Data Store
var storeJVM = Ext.create('Ext.data.Store', {
model : 'model-jvm',
autoLoad : true,
proxy : {
type : 'ajax',
url : '/serverside/dtcache/Auto201208151102TST08WS.12.9.0.B57.WL1020120815110221.xml',
reader : {
type : 'xml',
record : 'measures>measure[@measure="Total GC Activations (split by Agent)"]>measurement'
}
}
});

chart = Ext.create('Ext.chart.Chart', {
id: 'chartCmp',
xtype: 'chart',
style: 'background:#fff',
animate: true,
store: storeJVM,
legend: {
position: 'bottom'
},
axes: [{
type: 'Numeric',
grid: true,
position: 'left',
fields: ['@sum'],
title: 'Count',
grid: {
odd: {
opacity: 1,
fill: '#ddd',
stroke: '#bbb',
'stroke-width': 1
}
},
minimum: 0,
adjustMinimumByMajorUnit: 0
}, {
type: 'Time',
position: 'bottom',
fields: ['@timestamp'],
title: 'Time',
grid: true,
label: {
rotate: {
degrees: 315
}
}
}],
series: [{
type: 'area',
highlight: false,
axis: 'left',
xField: 'name',
yField: ['GC Activations'],
style: {
opacity: 0.93
}
}]
});

var win = Ext.create('Ext.Window', {
width: 800,
height: 600,
minHeight: 400,
minWidth: 550,
hidden: false,
shadow: false,
maximizable: true,
title: 'Area Chart',
renderTo: Ext.getBody(),
layout: 'fit',
items: chart
});
});
</script>






<chartdashlet name="JVM" description="" showabsolutevalues="false">
<measures>
<measure measure="Total GC Activations (split by Agent)" color="#404080" aggregation="Sum" avg="5.184210526315789" unit="num" min="0.0" max="14.0" sum="197.0"lastvalue="0.0" count="113">
<measurement timestamp="1345042950000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345042980000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043010000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043040000" avg="2.3333333333333335" min="0.0" max="5.0" sum="7.0" count="3"/>
<measurement timestamp="1345043070000" avg="4.666666666666667" min="4.0" max="5.0" sum="14.0" count="3"/>
<measurement timestamp="1345043100000" avg="4.0" min="3.0" max="5.0" sum="12.0" count="3"/>
<measurement timestamp="1345043130000" avg="4.0" min="3.0" max="5.0" sum="12.0" count="3"/>
<measurement timestamp="1345043160000" avg="3.0" min="3.0" max="3.0" sum="9.0" count="3"/>
<measurement timestamp="1345043190000" avg="4.0" min="2.0" max="6.0" sum="12.0" count="3"/>
<measurement timestamp="1345043220000" avg="2.3333333333333335" min="1.0" max="4.0" sum="7.0" count="3"/>
<measurement timestamp="1345043250000" avg="3.0" min="3.0" max="3.0" sum="9.0" count="3"/>
<measurement timestamp="1345043280000" avg="1.0" min="0.0" max="2.0" sum="3.0" count="3"/>
<measurement timestamp="1345043310000" avg="1.6666666666666667" min="1.0" max="2.0" sum="5.0" count="3"/>
<measurement timestamp="1345043340000" avg="3.3333333333333335" min="2.0" max="5.0" sum="10.0" count="3"/>
<measurement timestamp="1345043370000" avg="2.6666666666666665" min="2.0" max="3.0" sum="8.0" count="3"/>
<measurement timestamp="1345043400000" avg="0.6666666666666666" min="0.0" max="1.0" sum="2.0" count="3"/>
<measurement timestamp="1345043430000" avg="1.3333333333333333" min="1.0" max="2.0" sum="4.0" count="3"/>
<measurement timestamp="1345043460000" avg="1.6666666666666667" min="0.0" max="3.0" sum="5.0" count="3"/>
<measurement timestamp="1345043490000" avg="0.6666666666666666" min="0.0" max="1.0" sum="2.0" count="3"/>
<measurement timestamp="1345043520000" avg="2.0" min="2.0" max="2.0" sum="6.0" count="3"/>
<measurement timestamp="1345043550000" avg="2.6666666666666665" min="2.0" max="3.0" sum="8.0" count="3"/>
<measurement timestamp="1345043580000" avg="3.0" min="1.0" max="4.0" sum="9.0" count="3"/>
<measurement timestamp="1345043610000" avg="3.3333333333333335" min="3.0" max="4.0" sum="10.0" count="3"/>
<measurement timestamp="1345043640000" avg="2.6666666666666665" min="2.0" max="3.0" sum="8.0" count="3"/>
<measurement timestamp="1345043670000" avg="2.3333333333333335" min="2.0" max="3.0" sum="7.0" count="3"/>
<measurement timestamp="1345043700000" avg="2.6666666666666665" min="2.0" max="3.0" sum="8.0" count="3"/>
<measurement timestamp="1345043730000" avg="2.0" min="2.0" max="2.0" sum="6.0" count="3"/>
<measurement timestamp="1345043760000" avg="2.3333333333333335" min="2.0" max="3.0" sum="7.0" count="3"/>
<measurement timestamp="1345043790000" avg="0.6666666666666666" min="0.0" max="2.0" sum="2.0" count="3"/>
<measurement timestamp="1345043820000" avg="1.3333333333333333" min="0.0" max="2.0" sum="4.0" count="3"/>
<measurement timestamp="1345043850000" avg="0.3333333333333333" min="0.0" max="1.0" sum="1.0" count="3"/>
<measurement timestamp="1345043880000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043910000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043940000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043970000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044000000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044030000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044060000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="2"/>

</measure>


<measure measure="Total GC Collection Time (split by Agent)" color="#008000" aggregation="Sum" avg="967.6315789473684" unit="ms" min="0.0" max="3293.0"sum="36770.0" lastvalue="0.0" count="113">
<measurement timestamp="1345042950000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345042980000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043010000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043040000" avg="291.3333333333333" min="0.0" max="607.0" sum="874.0" count="3"/>
<measurement timestamp="1345043070000" avg="581.3333333333334" min="555.0" max="608.0" sum="1744.0" count="3"/>
<measurement timestamp="1345043100000" avg="537.0" min="403.0" max="607.0" sum="1611.0" count="3"/>
<measurement timestamp="1345043130000" avg="1097.6666666666667" min="578.0" max="1996.0" sum="3293.0" count="3"/>
<measurement timestamp="1345043160000" avg="470.3333333333333" min="449.0" max="490.0" sum="1411.0" count="3"/>
<measurement timestamp="1345043190000" avg="646.6666666666666" min="308.0" max="910.0" sum="1940.0" count="3"/>
<measurement timestamp="1345043220000" avg="366.0" min="206.0" max="658.0" sum="1098.0" count="3"/>
<measurement timestamp="1345043250000" avg="597.3333333333334" min="505.0" max="656.0" sum="1792.0" count="3"/>
<measurement timestamp="1345043280000" avg="186.33333333333334" min="0.0" max="377.0" sum="559.0" count="3"/>
<measurement timestamp="1345043310000" avg="338.3333333333333" min="144.0" max="439.0" sum="1015.0" count="3"/>
<measurement timestamp="1345043340000" avg="751.6666666666666" min="277.0" max="1636.0" sum="2255.0" count="3"/>
<measurement timestamp="1345043370000" avg="509.6666666666667" min="273.0" max="691.0" sum="1529.0" count="3"/>
<measurement timestamp="1345043400000" avg="99.33333333333333" min="0.0" max="158.0" sum="298.0" count="3"/>
<measurement timestamp="1345043430000" avg="259.6666666666667" min="157.0" max="431.0" sum="779.0" count="3"/>
<measurement timestamp="1345043460000" avg="274.3333333333333" min="0.0" max="480.0" sum="823.0" count="3"/>
<measurement timestamp="1345043490000" avg="105.33333333333333" min="0.0" max="186.0" sum="316.0" count="3"/>
<measurement timestamp="1345043520000" avg="443.6666666666667" min="238.0" max="725.0" sum="1331.0" count="3"/>
<measurement timestamp="1345043550000" avg="409.6666666666667" min="336.0" max="489.0" sum="1229.0" count="3"/>
<measurement timestamp="1345043580000" avg="867.6666666666666" min="147.0" max="1870.0" sum="2603.0" count="3"/>
<measurement timestamp="1345043610000" avg="529.3333333333334" min="421.0" max="741.0" sum="1588.0" count="3"/>
<measurement timestamp="1345043640000" avg="416.0" min="305.0" max="528.0" sum="1248.0" count="3"/>
<measurement timestamp="1345043670000" avg="349.0" min="328.0" max="384.0" sum="1047.0" count="3"/>
<measurement timestamp="1345043700000" avg="412.0" min="240.0" max="514.0" sum="1236.0" count="3"/>
<measurement timestamp="1345043730000" avg="382.3333333333333" min="296.0" max="430.0" sum="1147.0" count="3"/>
<measurement timestamp="1345043760000" avg="393.3333333333333" min="276.0" max="599.0" sum="1180.0" count="3"/>
<measurement timestamp="1345043790000" avg="660.3333333333334" min="0.0" max="1981.0" sum="1981.0" count="3"/>
<measurement timestamp="1345043820000" avg="231.66666666666666" min="0.0" max="358.0" sum="695.0" count="3"/>
<measurement timestamp="1345043850000" avg="49.333333333333336" min="0.0" max="148.0" sum="148.0" count="3"/>
<measurement timestamp="1345043880000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043910000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043940000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345043970000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044000000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044030000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="3"/>
<measurement timestamp="1345044060000" avg="0.0" min="0.0" max="0.0" sum="0.0" count="2"/>

</measure>


<measure measure="Used Memory (split by Agent)" color="#400080" aggregation="Maximum" avg="1729.4945228978206" unit="MB" min="1113.4415283203125"max="2706.201171875" sum="65720.79187011719" lastvalue="1280.9500732421875" count="113">
<measurement timestamp="1345042950000" avg="1113.4415283203125" min="1113.4415283203125" max="1113.4415283203125" sum="3340.3245849609375" count="3"/>
<measurement timestamp="1345042980000" avg="1113.4415283203125" min="1113.4415283203125" max="1113.4415283203125" sum="3340.3245849609375" count="3"/>
<measurement timestamp="1345043010000" avg="1113.4415283203125" min="1113.4415283203125" max="1113.4415283203125" sum="3340.3245849609375" count="3"/>
<measurement timestamp="1345043040000" avg="1338.0935465494792" min="1114.8206787109375" max="1471.0390625" sum="4014.2806396484375" count="3"/>
<measurement timestamp="1345043070000" avg="1733.6682535807292" min="1524.747802734375" max="1921.676513671875" sum="5201.0047607421875" count="3"/>
<measurement timestamp="1345043100000" avg="2243.73388671875" min="2121.74169921875" max="2314.625244140625" sum="6731.20166015625" count="3"/>
<measurement timestamp="1345043130000" avg="1864.6525472005208" min="753.3433837890625" max="2539.8466796875" sum="5593.9576416015625" count="3"/>
<measurement timestamp="1345043160000" avg="1099.5362955729167" min="949.62646484375" max="1211.579345703125" sum="3298.60888671875" count="3"/>
<measurement timestamp="1345043190000" avg="1293.8175048828125" min="1206.404541015625" max="1412.7791748046875" sum="3881.4525146484375" count="3"/>
<measurement timestamp="1345043220000" avg="1541.1620279947917" min="1405.7742919921875" max="1709.3465576171875" sum="4623.486083984375" count="3"/>
<measurement timestamp="1345043250000" avg="1988.6725667317708" min="1928.155517578125" max="2091.963134765625" sum="5966.0177001953125" count="3"/>
<measurement timestamp="1345043280000" avg="2228.7591145833335" min="2087.828125" max="2419.535400390625" sum="6686.27734375" count="3"/>
<measurement timestamp="1345043310000" avg="2262.3826497395835" min="2217.01318359375" max="2338.91357421875" sum="6787.14794921875" count="3"/>
<measurement timestamp="1345043340000" avg="1257.329854329427" min="582.8988037109375" max="2390.74267578125" sum="3771.9895629882812" count="3"/>
<measurement timestamp="1345043370000" avg="1158.5597737630208" min="1028.9915771484375" max="1345.5299072265625" sum="3475.6793212890625" count="3"/>
<measurement timestamp="1345043400000" avg="1322.9167073567708" min="1160.3294677734375" max="1480.75048828125" sum="3968.7501220703125" count="3"/>
<measurement timestamp="1345043430000" avg="1554.7088623046875" min="1546.281494140625" max="1562.391845703125" sum="4664.1265869140625" count="3"/>
<measurement timestamp="1345043460000" avg="1510.6898600260417" min="1443.6756591796875" max="1618.052978515625" sum="4532.069580078125" count="3"/>
<measurement timestamp="1345043490000" avg="1566.6208902994792" min="1529.7098388671875" max="1609.20361328125" sum="4699.8626708984375" count="3"/>
<measurement timestamp="1345043520000" avg="1827.8847249348958" min="1779.0848388671875" max="1856.2418212890625" sum="5483.6541748046875" count="3"/>
<measurement timestamp="1345043550000" avg="2241.1215006510415" min="2028.952880859375" max="2389.302734375" sum="6723.364501953125" count="3"/>
<measurement timestamp="1345043580000" avg="1910.6531168619792" min="977.5379638671875" max="2518.54541015625" sum="5731.9593505859375" count="3"/>
<measurement timestamp="1345043610000" avg="1291.8870442708333" min="1203.408203125" max="1418.859375" sum="3875.6611328125" count="3"/>
<measurement timestamp="1345043640000" avg="1520.9855550130208" min="1383.9041748046875" max="1772.19580078125" sum="4562.9566650390625" count="3"/>
<measurement timestamp="1345043670000" avg="1654.8369140625" min="1444.0665283203125" max="1765.0433349609375" sum="4964.5107421875" count="3"/>
<measurement timestamp="1345043700000" avg="1960.4651692708333" min="1856.7147216796875" max="2131.82421875" sum="5881.3955078125" count="3"/>
<measurement timestamp="1345043730000" avg="2259.4684244791665" min="2036.050048828125" max="2489.974365234375" sum="6778.4052734375" count="3"/>
<measurement timestamp="1345043760000" avg="2392.3983561197915" min="2288.313720703125" max="2565.4267578125" sum="7177.195068359375" count="3"/>
<measurement timestamp="1345043790000" avg="2123.764892578125" min="983.125732421875" max="2706.201171875" sum="6371.294677734375" count="3"/>
<measurement timestamp="1345043820000" avg="1065.758056640625" min="943.0552978515625" max="1135.23779296875" sum="3197.274169921875" count="3"/>
<measurement timestamp="1345043850000" avg="1239.9058430989583" min="1225.55908203125" max="1255.48046875" sum="3719.717529296875" count="3"/>
<measurement timestamp="1345043880000" avg="1260.8450520833333" min="1255.51171875" max="1263.51171875" sum="3782.53515625" count="3"/>
<measurement timestamp="1345043910000" avg="1272.314208984375" min="1272.314208984375" max="1272.314208984375" sum="3816.942626953125" count="3"/>
<measurement timestamp="1345043940000" avg="1277.6787923177083" min="1272.345458984375" max="1280.345458984375" sum="3833.036376953125" count="3"/>
<measurement timestamp="1345043970000" avg="1280.345458984375" min="1280.345458984375" max="1280.345458984375" sum="3841.036376953125" count="3"/>
<measurement timestamp="1345044000000" avg="1280.345458984375" min="1280.345458984375" max="1280.345458984375" sum="3841.036376953125" count="3"/>
<measurement timestamp="1345044030000" avg="1280.345458984375" min="1280.345458984375" max="1280.345458984375" sum="3841.036376953125" count="3"/>
<measurement timestamp="1345044060000" avg="1280.9500732421875" min="1280.9500732421875" max="1280.9500732421875" sum="2561.900146484375" count="2"/>

</measure>
</measures>
</chartdashlet>