2006-03-17 jrandom

* Add support for graphing the event count as well as the average stat
      value (done by adding &showEvents=true to the URL).  Also supports
      hiding the legend (&hideLegend=true), the grid (&hideGrid=true), and
      the title (&hideTitle=true).
    * Removed an unnecessary arbitrary filter on the profile organizer so we
      can pick high capacity and fast peers more appropriately
This commit is contained in:
jrandom
2006-03-17 23:46:00 +00:00
committed by zzz
parent 52094b10c9
commit b03ff21d3b
7 changed files with 57 additions and 22 deletions

View File

@@ -86,12 +86,14 @@ public class StatSummarizer implements Runnable {
lsnr.startListening();
//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); }
public boolean renderPng(Rate rate, OutputStream out, int width, int height) throws IOException {
public boolean renderPng(Rate rate, OutputStream out) throws IOException {
return renderPng(rate, out, -1, -1, false, false, false, false);
}
public boolean renderPng(Rate rate, OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents) 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);
lsnr.renderPng(out, width, height, hideLegend, hideGrid, hideTitle, showEvents);
return true;
}
}