|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.perf4j.helpers.GroupedTimingStatisticsCsvFormatter
public class GroupedTimingStatisticsCsvFormatter
This helper formatter class outputs GroupedTimingStatistics
in a comma-separated value format.
This class supports two main types of formats:
Nested Class Summary | |
---|---|
protected static interface |
GroupedTimingStatisticsCsvFormatter.GroupedTimingStatisticsValueRetriever
|
protected static interface |
GroupedTimingStatisticsCsvFormatter.TimingStatsValueRetriever
|
Field Summary | |
---|---|
static String |
DEFAULT_FORMAT_STRING
The default format string for a non-pivoted formatter. |
Constructor Summary | |
---|---|
GroupedTimingStatisticsCsvFormatter()
Creates a non-pivoted CSV formatter using the default format string. |
|
GroupedTimingStatisticsCsvFormatter(boolean pivot,
String configString)
Creates a CSV formatter which allows you to config which values are output. |
Method Summary | |
---|---|
String |
format(GroupedTimingStatistics stats)
Formats the specified GroupedTimingStatistics instance for CSV output. |
protected String |
formatDate(long timeInMillis)
Formats the specified time in yyyy-MM-dd HH:mm:ss format. |
protected GroupedTimingStatisticsCsvFormatter.GroupedTimingStatisticsValueRetriever |
parsePivotedTimingStatsConfig(String configName)
Helper method parses the specified single element from a config string to return the corresponding GroupedTimingStatisticsValueRetriever. |
protected GroupedTimingStatisticsCsvFormatter.TimingStatsValueRetriever |
parseTimingStatsConfig(String configName)
Helper method parses the specified single element from a config string to return the corresponding TimingStatsValueRetriever. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_FORMAT_STRING
Constructor Detail |
---|
public GroupedTimingStatisticsCsvFormatter()
public GroupedTimingStatisticsCsvFormatter(boolean pivot, String configString)
pivot
- Whether the output is pivoted (one row for each GroupedTimingStatisitcs) or not (one row
for each tagged TimingStatistics item contained in the GroupedTimingStatisitcs).configString
- The config string defines which values will be output, and should be a comma-separated list
of the values. Possible values if pivot is false are
tag, start, stop, mean, min, max, stddev, count and tps. If pivot is true the possible
values are start, stop, and then one of the statistics prefixed with the tag name. For
example, a possible configString could be "start,stop,codeBlock1Mean,codeBlock2Max".Method Detail |
---|
public String format(GroupedTimingStatistics stats)
format
in interface GroupedTimingStatisticsFormatter
stats
- the GroupedTimingStatistics instance, may not be null
protected String formatDate(long timeInMillis)
timeInMillis
- The time in milliseconds.
protected GroupedTimingStatisticsCsvFormatter.GroupedTimingStatisticsValueRetriever parsePivotedTimingStatsConfig(String configName)
configName
- The element from the config string
IllegalArgumentException
- Thrown if configName is an unknown value designatorprotected GroupedTimingStatisticsCsvFormatter.TimingStatsValueRetriever parseTimingStatsConfig(String configName)
configName
- The element from the config string
IllegalArgumentException
- Thrown if configName is an unknown value designator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |