/** * @param start the start to set */ public void setStart(Date start) { long step = getNode().getProbe().getStep(); this.start = new Date(org.rrd4j.core.Util.normalize(start.getTime() / 1000L, step) * 1000L); }
private double parseRangeArg(String rangeArg, Graph g) { if(rangeArg == null) return Double.NaN; Matcher m = rangePattern.matcher(rangeArg); jrds.GraphNode node = g.getNode(); if(m.matches() && node != null) { String valueString = m.group(1); Number value = jrds.Util.parseStringNumber(valueString, Double.NaN); String suffixString = m.group(3); if(!"".equals(suffixString)) { try { SiPrefix suffix = SiPrefix.valueOf(suffixString); return suffix.evaluate(value.doubleValue(), node.getGraphDesc().isSiUnit()); } catch (java.lang.IllegalArgumentException e) { logger.info("Illegal SI suffix " + suffixString); } } else return value.doubleValue(); } return Double.NaN; }
message = String.format("Error rendering graph %s: %s", graphName, e.getMessage()); } catch (Exception e1) { String graphName = graph.getNode().getProbe().getName() + "/" + graph.getNode().getGraphDesc().getGraphName(); message = String.format("Error rendering incomplete graph %s: %s", graphName, e.getMessage());
return; GraphDesc gd = graph.getNode().getGraphDesc();
/** * Return the RRD4J's DataProcessor object for this graph * * @return an already processed data processor * @throws IOException */ public DataProcessor getDataProcessor() throws IOException { ExtractInfo ei = ExtractInfo.get().make(start, end); return getNode().getPlottedDate(ei); }
int graphStep = graph.getNode().getProbe().getStep(); if(p.period.getScale() != 0 || !cache) { res.addDateHeader("Expires", new Date().getTime() + graphStep * 1000);