code: @Override
  	protected void afterPaint(final RenderContext renderContext) {
  		super.afterPaint(renderContext);
  
  		// UIC serialization stats
  		UicStats stats = new UicStats(UIContextHolder.getCurrent());
  
  		stats.analyseWC(this);
  
  		if (renderContext instanceof WebXmlRenderContext) {
  			PrintWriter writer = ((WebXmlRenderContext) renderContext).getWriter();
  
  			writer.println("<h2>Serialization Profile of UIC</h2>");
  			UicStatsAsHtml.write(writer, stats);
  
  			// ObjectProfiler
  			writer.println("<h2>ObjectProfiler - " + getClass().getName() + "</h2>");
  			writer.println("<pre>");
  
  			try {
  				writer.println(ObjectGraphDump.dump(this).toFlatSummary());
  			} catch (Exception e) {
  				LOG.error("Failed to dump component", e);
  			}
  
  			writer.println("</pre>");
  		}
  	}
docs: Override afterPaint to write the statistics after the component is painted.
  
  @param renderContext the renderContext to send output to.