Analyze Performance with Pipeline Profiler

Use the pipeline profiler to tune the performance of scripts and pipelines during development and testing. Pipeline Profiler collects and aggregates pipeline run times for each node and script in a pipeline. You must trigger the pipeline in the storefront for the Pipeline Profiler. You can use this information to identify problem areas of code and then optimize them.

Salesforce recommends that you use the Pipeline Profiler both in development and during load testing. The specific performance of a pipeline depends on the tasks it's intended to accomplish, but as a general rule, we recommend that a pipeline shouldn't take more than three seconds to execute when it includes non-cached components and no more than 250 milliseconds when it includes cached components. These guidelines assume that there might be additional performance costs to constructing a page in addition to the pipeline, for example, executing JavaScript or retrieving rich content, such as flash content. Generally, you can expect that performance load testing might also be required to judge the performance of a page on a live site. The Pipeline Profiler is a useful tool for examining pipelines during this phase of testing.

Note: Salesforce B2C Commerce also recommends that you use the pipeline profiler on production to find performance bottlenecks, but only for about fifteen minutes.
  1. Open the storefront for the site containing the pipeline you want to examine.
  2. Select Administration > Operations > Pipeline Profiler.
  3. On the Pipeline Profiler page, click to activate the profile.
    If you have not opened the storefront, the site name does not appear in the Browse Captured Data section of the page. At least one site must appear here for data to be collected.

    The icon changes to and the profiler starts to capture data.

  4. In the storefront, trigger the pipelines or scripts you want to test. Salesforce recommends that you trigger the scripts several times to allow for meaningful averages in performance statistics.
    Your performance times might vary depending on whether a template is cached, site traffic volume, or for other reasons. B2C Commerce recommends that you trigger a pipeline multiple times for a good average. Commerce Cloud also recommends that you use the Pipeline Profiler during load testing to understand the effect of traffic on pipeline performance.

    If a script is triggered, you see the data on the Pipeline Profiler page.

  5. Click to deactivate the Pipeline Profiler. This prevents additional data from being added, which can make the data easier to interpret.
  6. Examine the captured data for scripts on the Pipeline Profiler page by clicking Script Data.
    The Script Data page displays the results of the performance profiling of script processing.
    • Own Time: Time spent within the function (time spent within functions called by that function are not taken into account).

    • Total Time: Time spent within all other function calls.

    • Average Own Time: Average time for one call of the function.

    • Average Total Time: Average time for all other function calls.

  7. Click the site name in the Browse Captured Data section of the page to examine pipeline performance. This page makes it easy to see if a node or script is called frequently, and is therefore a good candidate for optimization.

    The Profiler - Pipeline Performance page opens.

    Click any of the column names to sort results by Start Node Name, Hits, Total Time, Average Time, Minimum Time, or Maximum Time.

  8. Click a pipeline name to view detailed performance information for that pipeline. This page is useful for determining whether a template, script, or node is costing the most time.
  9. On the Pipeline Performance Detail page:
    1. Click any of the column names to sort results by Start Node Name, Pipelet Node ID, Interaction Node ID, Hits, Total Time, Average Time, Minimum Time, or Maximum Time.
    2. Click any template name to see how templates and included templates perform.