9596979899100101102103104105
vl.setPluginInstance (plugin_instance); vl.setType ("memory"); if (mem_init >= 0) { vl.addValue (mem_init); vl.setTypeInstance ("init"); Collectd.dispatchValues (vl); vl.clearValues (); }
103104105106107108109110111112113
vl.clearValues (); } if (mem_used >= 0) { vl.addValue (mem_used); vl.setTypeInstance ("used"); Collectd.dispatchValues (vl); vl.clearValues (); }
111112113114115116117118119120121
vl.clearValues (); } if (mem_committed >= 0) { vl.addValue (mem_committed); vl.setTypeInstance ("committed"); Collectd.dispatchValues (vl); vl.clearValues (); }
119120121122123124125126127128129
vl.clearValues (); } if (mem_max >= 0) { vl.addValue (mem_max); vl.setTypeInstance ("max"); Collectd.dispatchValues (vl); vl.clearValues (); } } /* }}} void submit */
5253545556575859606162
vl.setInterval(interval); vl.setTime(now); vl.setPlugin(PLUGIN); vl.setPluginInstance(ValueListTest.class.getName()); for (int i=0; i<values.length; i++) { vl.addValue(new Double(values[i])); } return vl; } private void dummyAssert(ValueList vl) {
167168169170171172173174175176177
} } vl.setPluginInstance(pluginInstance + "-" + beanName); vl.setType(attr.getTypeName()); vl.setTypeInstance(typeInstance); vl.addValue(val); _sender.dispatch(vl); } public void collect(MBeanQuery query, ObjectName name) throws Exception { MBeanServerConnection conn = _sender.getMBeanServerConnection();
105106107108109110111112113114115
} public void testGauge() throws Exception { ValueList vl = newValueList(); for (double val : dvals) { vl.addValue(new Double(val)); } _sender.dispatch(vl); String host = vl.getHost(); long time = vl.getTime() / 1000; flush();
126127128129130131132133134135136
} public void testCounter() throws Exception { ValueList vl = newValueList(); for (long val : lvals) { vl.addValue(new Long(val)); } _sender.dispatch(vl); String host = vl.getHost(); long time = vl.getTime() / 1000; flush();