2006-03-18 jrandom

* Made the netDb search load limitations a little less stringent
    * Add support for specifying the number of periods to be plotted on the
      graphs - e.g. to plot only the last hour of a stat that is averaged at
      the 60 second period, add &periodCount=60
This commit is contained in:
jrandom
2006-03-18 23:09:35 +00:00
committed by zzz
parent b03ff21d3b
commit f3849a22ad
7 changed files with 84 additions and 21 deletions

View File

@@ -87,18 +87,22 @@ public class StatSummarizer implements Runnable {
//System.out.println("Start listening for " + r.getRateStat().getName() + ": " + r.getPeriod());
}
public boolean renderPng(Rate rate, OutputStream out) throws IOException {
return renderPng(rate, out, -1, -1, false, false, false, false);
return renderPng(rate, out, -1, -1, false, false, false, false, -1);
}
public boolean renderPng(Rate rate, OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents) throws IOException {
public boolean renderPng(Rate rate, OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount) throws IOException {
for (int i = 0; i < _listeners.size(); i++) {
SummaryListener lsnr = (SummaryListener)_listeners.get(i);
if (lsnr.getRate().equals(rate)) {
lsnr.renderPng(out, width, height, hideLegend, hideGrid, hideTitle, showEvents);
lsnr.renderPng(out, width, height, hideLegend, hideGrid, hideTitle, showEvents, periodCount);
return true;
}
}
return false;
}
public boolean renderPng(OutputStream out, String templateFilename) throws IOException {
SummaryRenderer.render(_context, out, templateFilename);
return true;
}
public boolean getXML(Rate rate, OutputStream out) throws IOException {
for (int i = 0; i < _listeners.size(); i++) {
SummaryListener lsnr = (SummaryListener)_listeners.get(i);