public ModelAndView viewPerformanceMonitor(HttpServletRequest request,
HttpServletResponse response) throws Exception {
final StringBuilder sb = new StringBuilder();
PerformanceMonitorFactory factory = performanceAspect.getPerformanceMonitorFactory();
for (String monitorName : factory.getPerformanceMonitorNames()) {
PerformanceMonitor m = factory.findPerformanceMonitor(monitorName);
sb.append(String.format("[%s]", monitorName)).append("\n");
// Go through all methods and invoke those with ManagedAttribute
// marker annotations
Method[] methods = m.getClass().getMethods();
for (Method monitorMethod : methods) {
if (monitorMethod.getName().startsWith("get")) {
sb.append(
String.format("\t%s: %s\n",
monitorMethod.getName().substring(3),