/** * This method looks for all known GraphingStatisticsAppenders and returns their names. * * @return The list of known GraphingStatisticsAppender names. */ protected List<String> getAllKnownGraphNames() { List<String> retVal = new ArrayList<String>(); for (GraphingStatisticsSink appender : GraphingStatisticsSink.getAllGraphingStatisticsSinks()) { retVal.add(appender.getName()); } return retVal; }
/** * Finds the specified graph by using the {@link * org.perf4j.log4j.GraphingStatisticsAppender#getAppenderByName(String)} method to find the * appender with the specified name. * * @param name the name of the GraphingStatisticsAppender whose chart generator should be * returned. * @return The specified chart generator, or null if no appender with the specified name was * found. */ protected StatisticsChartGenerator getGraphByName(String name) { GraphingStatisticsSink sink = GraphingStatisticsSink.getSinkByName(name); return (sink == null) ? null : sink.getChartGenerator(); }