From: Sasa M. <sa...@us...> - 2004-11-19 12:00:11
|
Update of /cvsroot/jrobin/src/org/jrobin/demo In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4753/org/jrobin/demo Modified Files: Demo.java Log Message: Added split() method to the RrdToolkit class to split single RRD file into several new ones. Each new file contains only a single datasource. All archived values are preserved. Index: Demo.java =================================================================== RCS file: /cvsroot/jrobin/src/org/jrobin/demo/Demo.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Demo.java 5 Nov 2004 12:22:52 -0000 1.3 --- Demo.java 19 Nov 2004 12:00:02 -0000 1.4 *************** *** 1,4 **** - package org.jrobin.demo; - /* ============================================================ * JRobin : Pure java implementation of RRDTool's functionality --- 1,2 ---- *************** *** 26,29 **** --- 24,29 ---- */ + package org.jrobin.demo; + import org.jrobin.core.*; import org.jrobin.graph.RrdGraph; *************** *** 38,43 **** class Demo { - // static final String FACTORY_NAME = "NIO"; - static final long SEED = 1909752002L; static final Random RANDOM = new Random(SEED); --- 38,41 ---- *************** *** 49,54 **** public static void main(String[] args) throws RrdException, IOException { - // RrdDb.setDefaultFactory(FACTORY_NAME); - // setup println("== Starting demo"); RrdDb.setLockMode(RrdDb.NO_LOCKS); --- 47,50 ---- *************** *** 137,145 **** FetchData fetchData = request.fetchData(); println("== Data fetched. " + fetchData.getRowCount() + " points obtained"); ! for(int i = 0; i < fetchData.getRowCount(); i++) { ! println(fetchData.getRow(i).dump()); ! } ! println("== Dumping fetch data to XML format"); println(fetchData.exportXml()); println("== Fetch completed"); --- 133,143 ---- FetchData fetchData = request.fetchData(); println("== Data fetched. " + fetchData.getRowCount() + " points obtained"); ! println(fetchData.toString()); ! println("== Dumping fetched data to XML format"); println(fetchData.exportXml()); + println("== Dumping fetch statistics for datasource 'sun'"); + println(fetchData.getStats("sun").dump()); + println("== Dumping fetch statistics for datasource 'shade'"); + println(fetchData.getStats("shade").dump()); println("== Fetch completed"); |