Package net.i2p.router.web
Class SummaryListener
java.lang.Object
net.i2p.router.web.SummaryListener
- All Implemented Interfaces:
RateSummaryListener
Creates and updates the in-memory or on-disk RRD database,
and provides methods to generate graphs of the data
- Since:
- 0.6.1.13
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ConsolFun(package private) static final DsTypestatic final int(package private) static final intstatic final String(package private) static final Stringnote that .jrb files are NOT compatible with .rrd files(package private) static final String(package private) static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double totalValue, long eventCount, double totalEventTime, long period) (package private) static StringcreateName(I2PAppContext ctx, String wanted) JRobin can only deal with 20 character data source names, so we need to create a unique, munged version from the user/developer-visible name.boolean(package private) RrdBackendFactory(package private) RrdDbgetData()(package private) String(package private) StringgetName()getRate()(package private) intgetRows()inthashCode()(package private) longnow()voidrenderPng(OutputStream out) voidrenderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) Single graph.voidrenderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit, SummaryListener lsnr2, String titleOverride) Single or two-data-source graph.booleanvoid
-
Field Details
-
PROP_PERSISTENT
- Since:
- public since 0.9.33, was package private
- See Also:
-
RRD_DIR
note that .jrb files are NOT compatible with .rrd files- See Also:
-
RRD_PREFIX
- See Also:
-
RRD_SUFFIX
- See Also:
-
CF
-
DS
-
PERIODS
static final int PERIODS- See Also:
-
MAX_ROWS
public static final int MAX_ROWS- Since:
- public since 0.9.33, was package private
- See Also:
-
-
Constructor Details
-
SummaryListener
-
-
Method Details
-
add
public void add(double totalValue, long eventCount, double totalEventTime, long period) - Specified by:
addin interfaceRateSummaryListener- Parameters:
totalValue- sum of all event values in the most recent periodeventCount- how many events occurredtotalEventTime- how long the events were running forperiod- how long this period is
-
createName
JRobin can only deal with 20 character data source names, so we need to create a unique, munged version from the user/developer-visible name. -
getRate
-
startListening
public boolean startListening()- Returns:
- success
-
stopListening
public void stopListening() -
renderPng
public void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) throws IOException Single graph.- Parameters:
end- number of periods before now- Throws:
IOException
-
renderPng
public void renderPng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit, SummaryListener lsnr2, String titleOverride) throws IOException Single or two-data-source graph.- Parameters:
lsnr2- 2nd data source to plot on same graph, or null. Not recommended for events.titleOverride- If non-null, overrides the title- Throws:
IOException- Since:
- 0.9.6
-
renderPng
- Throws:
IOException
-
getName
String getName() -
getEventName
String getEventName() -
getData
RrdDb getData() -
now
long now() -
getBackendFactory
RrdBackendFactory getBackendFactory()- Since:
- 0.9.46
-
getRows
int getRows()- Since:
- 0.8.7
-
equals
-
hashCode
public int hashCode()
-