Package net.i2p.router.web
Class StatSummarizer
java.lang.Object
net.i2p.router.web.StatSummarizer
A thread started by RouterConsoleRunner that
checks the configuration for stats to be tracked via jrobin,
and adds or deletes RRDs as necessary.
This also contains methods to generate xml or png image output.
The rendering for graphs is in SummaryRenderer.
To control memory, the number of simultaneous renderings is limited.
- Since:
- 0.6.1.13
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe display name of the ClientApp, used in user interfaces.List of SummaryListener instancesgetName()The generic name of the ClientApp, used for registration, e.g.getState()The current state of the ClientApp.booleangetXML(Rate rate, OutputStream out) static StatSummarizerinstance()static StatSummarizerinstance(I2PAppContext ctx) static booleanisDisabled(I2PAppContext ctx) parseSpecs(String specs) booleanrenderPng(OutputStream out, String templateFilename) Deprecated.unusedbooleanrenderPng(Rate rate, OutputStream out) booleanrenderPng(Rate rate, OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) This does the single data graphs.booleanrenderRatePng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) This does the two-data bandwidth graph only.voidrun()(package private) voidDisable graph generation until restart See SummaryRenderer.render()(package private) static voidsetDisabled(I2PAppContext ctx) Disable graph generation until restart See SummaryRenderer.render()voidDoes nothing, we aren't trackedvoidstartup()Does nothing, we aren't tracked
-
Field Details
-
DEFAULT_DATABASES
- Since:
- public since 0.9.33, was package private
- See Also:
-
-
Constructor Details
-
StatSummarizer
-
-
Method Details
-
instance
- Returns:
- null if disabled
-
instance
- Returns:
- null if disabled
- Since:
- 0.9.38
-
run
public void run() -
isDisabled
- Since:
- 0.9.38
-
setDisabled
Disable graph generation until restart See SummaryRenderer.render()- Since:
- 0.9.6
-
setDisabled
void setDisabled()Disable graph generation until restart See SummaryRenderer.render()- Since:
- 0.9.38
-
startup
public void startup()Does nothing, we aren't tracked -
shutdown
Does nothing, we aren't tracked -
getState
Description copied from interface:ClientAppThe current state of the ClientApp. -
getName
Description copied from interface:ClientAppThe generic name of the ClientApp, used for registration, e.g. "console". Do not translate. -
getDisplayName
Description copied from interface:ClientAppThe display name of the ClientApp, used in user interfaces. The app must translate.- Specified by:
getDisplayNamein interfaceClientApp- Returns:
- non-null
- Since:
- 0.9.38
-
getListeners
List of SummaryListener instances- Since:
- public since 0.9.33, was package private
-
renderPng
- Throws:
IOException
-
renderPng
public boolean renderPng(Rate rate, OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) throws IOException This does the single data graphs. For the two-data bandwidth graph see renderRatePng(). Synchronized to conserve memory.- Parameters:
end- number of periods before now- Returns:
- success
- Throws:
IOException
-
renderPng
Deprecated.unused- Throws:
IOException
-
getXML
- Throws:
IOException
-
renderRatePng
public boolean renderRatePng(OutputStream out, int width, int height, boolean hideLegend, boolean hideGrid, boolean hideTitle, boolean showEvents, int periodCount, int end, boolean showCredit) throws IOException This does the two-data bandwidth graph only. For all other graphs see renderPng() above. Synchronized to conserve memory.- Parameters:
end- number of periods before now- Returns:
- success
- Throws:
IOException
-
parseSpecs
- Parameters:
specs- statName.period,statName.period,statName.period- Returns:
- list of Rate objects
- Since:
- public since 0.9.33, was package private
-