org.perf4j.chart
Interface StatisticsChartGenerator

All Known Implementing Classes:
GoogleChartGenerator

public interface StatisticsChartGenerator

Generates a chart based on data from a set of GroupedTimingStatistics.

Author:
Alex Devine

Field Summary
static int DEFAULT_MAX_DATA_POINTS
          The default maximum number of data points (along the X axis) that will be displayed.
 
Method Summary
 void appendData(GroupedTimingStatistics statistics)
          Appends a set of statistics to the list of data to be displayed on the chart.
 String getChartUrl()
          Implementing classes should return a URL to the chart that depicts the data sent in to the appendData method.
 List<GroupedTimingStatistics> getData()
          Gets the data that will be visualized by any charts created by this chart generator.
 

Field Detail

DEFAULT_MAX_DATA_POINTS

static final int DEFAULT_MAX_DATA_POINTS
The default maximum number of data points (along the X axis) that will be displayed. When appending data using the appendData method, implementing classes that respect this limit will only graph the last 20 statistics that were passed to appendData.

See Also:
Constant Field Values
Method Detail

getChartUrl

String getChartUrl()
Implementing classes should return a URL to the chart that depicts the data sent in to the appendData method. Note that the format of the URL is completely up to the implementing class - some implementations may generate a binary file and return a URL to the known server hosting the file, others may generate a Google Chart API-formatted URL, while others may return a data: URL with the image data directly embedded.

Returns:
A URL that can be used to display the chart.

appendData

void appendData(GroupedTimingStatistics statistics)
Appends a set of statistics to the list of data to be displayed on the chart.

Parameters:
statistics - the statistics to be added to the list of data.

getData

List<GroupedTimingStatistics> getData()
Gets the data that will be visualized by any charts created by this chart generator.

Returns:
The data for this chart generator.


Copyright © 2008-2011 perf4j.org. All Rights Reserved.