How to benchmark a theme

Author: Jean-Marc Orliaguet
Revision: $Id$

CPSSkins ships a benchmark timer to spot the performance problems of a portal.

To use the benchmark time, complete the following steps:

  1. Add the following External Method at the root of the portal:

    Id: cpsskins_benchmarktimer
    Title: CPSSkins benchmark timer'
    Module Name: CPSSkins.benchmarktimer
    Function Name: BenchmarkTimerInstance
    
  2. Go to the Theme editor and decide which page of which theme you want to benchmark.

  3. On the selected theme page, click on the pen and go to the Edit menu item.

  4. Then set the Page renderer option to Profiler.

  5. Once your benchmark tests are done you can safely set back to previous page renderer by setting the Page renderer option to Default or whatever its previous value was.

Here are below typical outputs of a page once the Page renderer option is set to Profiler.

Example 1:

Profiling lvl:-1 cpsskins_main_template_profiler:
t       mark       delta t
0.0000: Start      + 0.0000
0.0000: --------- [Header] -------------------------------  + 0.0000
0.0900:           header_container........................  + 0.0900
0.1000: --------- [Main] ---------------------------------  + 0.0100
0.1600:           treeview................................  + 0.0600
0.1700:           Latest_doc..............................  + 0.0100
0.4500:           Breadcrumb_lang_cells...................  + 0.2800
0.5600:           doc_actions.............................  + 0.1100
3.2600:           content well............................  + 2.7000
3.2600:           Quicklinks..............................  + 0.0000
3.2700: --------- [Footer] -------------------------------  + 0.0100
3.2800:           legal...................................  + 0.0100
3.2900:           conformance.............................  + 0.0100
3.3000: Stop       + 0.0100

Example 2:

Profiling lvl:-1 cpsskins_main_template_profiler:
t       mark       delta t
0.0000: Start      + 0.0000
0.0000: --------- [top] ----------------------------------  + 0.0000
0.0100: CPSSkins: banner..................................  + 0.0100
0.0100: CPSSkins: welcome box.............................  + 0.0000
0.0100: CPSSkins: search box..............................  + 0.0000
0.0200: CPSSkins: Action Box Templet......................  + 0.0100
0.0200: --------- [Navigation] ---------------------------  + 0.0000
0.0300: CPSSkins: maintabs................................  + 0.0100
0.0300: CPSSkins: actionbox...............................  + 0.0000
0.0400: CPSSkins: Breadcrumbs.............................  + 0.0100
0.0400: --------- [Main Columns] -------------------------  + 0.0000
0.1200:           Left-column slot........................  + 0.0800
0.1300: CPSSkins: action tab..............................  + 0.0100
0.2000:           Content actions.........................  + 0.0700
0.2800:           Main Content............................  + 0.0800
0.3000: CPSSkins: Workflow actions........................  + 0.0200
0.4100:           Right-column slot.......................  + 0.1100
0.4100: --------- [bottom] -------------------------------  + 0.0000
0.4200: CPSSkins: footer..................................  + 0.0100
0.4200: Stop       + 0.0000