private DataProcessor processData(Range range) throws IOException, RrdException { final String dataSourceName = getDataSourceName(); final long endTime = range.getJRobinEndTime(); final long startTime = range.getJRobinStartTime(); final DataProcessor dproc = new DataProcessor(startTime, endTime); dproc.addDatasource("average", rrdFileName, dataSourceName, ConsolFuns.CF_AVERAGE); dproc.setPoolUsed(true); dproc.processData(); return dproc; }
private DataProcessor createDataProcessor(String rpnExpression) throws RrdException { DataProcessor dataProcessor = new DataProcessor(request.getFetchStart(), request.getFetchEnd()); for (String dsName : dsNames) { dataProcessor.addDatasource(dsName, this); } if (rpnExpression != null) { dataProcessor.addDatasource(RPN_SOURCE_NAME, rpnExpression); try { dataProcessor.processData(); } catch (IOException ioe) { // highly unlikely, since all datasources have already calculated values throw new RuntimeException("Impossible error: " + ioe); } } return dataProcessor; } }
private void fetchData() throws RrdException, IOException { dproc = new DataProcessor(gdef.startTime, gdef.endTime); dproc.setPoolUsed(gdef.poolUsed); if (gdef.step > 0) { dproc.setStep(gdef.step); } for (Source src : gdef.sources) { src.requestData(dproc); } dproc.processData(); //long[] t = dproc.getTimestamps(); //im.start = t[0]; //im.end = t[t.length - 1]; im.start = gdef.startTime; im.end = gdef.endTime; }
DataProcessor dp = new DataProcessor(t1, t2);
final DataProcessor dbHelper = new DataProcessor(this); // dbHelper is local to onCreate // re-declared and initialized. While the instance variable is null
DataProcessor objDataProcessor = new DataProcessor(); Thread thProcessorThread1 = new Thread(objDataProcessor, "PROCESSOR-1"); thProcessorThread1.start(); Thread thProcessorThread2 = new Thread(objDataProcessor, "PROCESSOR-2"); thProcessorThread2.start();
protected void addVdefDs(RrdGraphDef graphDef, String sourceName, String[] rhs, double start, double end, Map<String,List<String>> defs) throws RrdException { if (rhs.length == 2) { graphDef.datasource(sourceName, rhs[0], rhs[1]); } else if (rhs.length == 3 && "PERCENT".equals(rhs[2])) { // Is there a better way to do this than with a separate DataProcessor? final double pctRank = Double.valueOf(rhs[1]); final DataProcessor dataProcessor = new DataProcessor((int)start, (int)end); for (final Entry<String, List<String>> entry : defs.entrySet()) { final String dsName = entry.getKey(); final List<String> thisDef = entry.getValue(); if (thisDef.size() == 3) { dataProcessor.addDatasource(dsName, thisDef.get(0), thisDef.get(1), thisDef.get(2)); } else if (thisDef.size() == 1) { dataProcessor.addDatasource(dsName, thisDef.get(0)); } } try { dataProcessor.processData(); } catch (IOException e) { throw new RrdException("Caught IOException: " + e.getMessage()); } double result = dataProcessor.getPercentile(rhs[0], pctRank); ConstantStaticDef csDef = new ConstantStaticDef((long)start, (long)end, result); graphDef.datasource(sourceName, csDef); } }
private DataProcessor createDataProcessor(String rpnExpression) throws RrdException { DataProcessor dataProcessor = new DataProcessor(request.getFetchStart(), request.getFetchEnd()); for (String dsName : dsNames) { dataProcessor.addDatasource(dsName, this); } if (rpnExpression != null) { dataProcessor.addDatasource(RPN_SOURCE_NAME, rpnExpression); try { dataProcessor.processData(); } catch (IOException ioe) { // highly unlikely, since all datasources have already calculated values throw new RuntimeException("Impossible error: " + ioe); } } return dataProcessor; } }
private void fetchData() throws RrdException, IOException { dproc = new DataProcessor(gdef.startTime, gdef.endTime); dproc.setPoolUsed(gdef.poolUsed); if (gdef.step > 0) { dproc.setStep(gdef.step); } for (Source src : gdef.sources) { src.requestData(dproc); } dproc.processData(); //long[] t = dproc.getTimestamps(); //im.start = t[0]; //im.end = t[t.length - 1]; im.start = gdef.startTime; im.end = gdef.endTime; }
final DataProcessor dproc = new DataProcessor(startInSeconds, endInSeconds); if (maxrows > 0) { dproc.setPixelCount(maxrows);
final DataProcessor dproc = new DataProcessor(startInSeconds, endInSeconds); if (maxrows > 0) { dproc.setPixelCount(maxrows);
private DataProcessor processData(Range range) throws IOException, RrdException { final String dataSourceName = getDataSourceName(); final long endTime = range.getJRobinEndTime(); final long startTime = range.getJRobinStartTime(); final DataProcessor dproc = new DataProcessor(startTime, endTime); dproc.addDatasource("average", rrdFileName, dataSourceName, ConsolFuns.CF_AVERAGE); dproc.setPoolUsed(true); dproc.processData(); return dproc; }
String endStr = getOptionValue("e", "end", DEFAULT_END); long span[] = Util.getTimestamps(startStr, endStr); dproc = new DataProcessor(span[0], span[1]); xports = new ArrayList<XPort>(); long step = parseLong(getOptionValue(null, "step", "1"));
DataProcessor dp = new DataProcessor(t1, t2);
dp.add(0, (IDataProcessor) new DataProcessor()); dp.add(1, (IDataProcessor) new DataProcessor2());