Package net.sourceforge.jrrd

Examples of net.sourceforge.jrrd.DataChunk


public class SimpleFetch1 {

  public SimpleFetch1(String rrdFile) {
    RRDatabase rrd = null;
    DataChunk chunk = null;
    try {
      rrd = new RRDatabase(rrdFile);
      // no period specified, so request the last 24 hours
      chunk = rrd.getData(ConsolidationFunctionType.AVERAGE);
      // retrieve the data for the first datasource
      Map<Date, Double> values = chunk.toMap(0);
            for(Map.Entry<Date, Double> entry : values.entrySet()) {
                Date index = entry.getKey();
                double v = entry.getValue();
                System.out.println("index: <" + index + ">, value <" + v + ">");
            }
View Full Code Here


public class SimpleFetch2 {

  public SimpleFetch2(String rrdFile) {
    RRDatabase rrd = null;
    DataChunk chunk = null;
    try {
      rrd = new RRDatabase(rrdFile);
      // no period specified, so request the last 24 hours
      chunk = rrd.getData(ConsolidationFunctionType.AVERAGE);
      // retreive the data for the first datasource
      Map<Date, Double> values = chunk.toMap(0);
            for(Map.Entry<Date, Double> entry : values.entrySet()) {
                Date index = entry.getKey();
                double v = entry.getValue();
                System.out.println("index: <" + index + ">, value <" + v + ">");
            }
View Full Code Here

TOP

Related Classes of net.sourceforge.jrrd.DataChunk

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.