Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.

Explore Performance Analysis Tools and Approaches

Learning Objectives

After completing this unit, you’ll be able to:

  • List three factors to consider when reviewing your site performance improvement approach.
  • Describe three server-based performance tools.
  • Describe three client-based performance tools.
  • List the types of data you can analyze using the Salesforce B2C Commerce Reports & Dashboards technical reports.
  • Explain what you can learn from cache hit ratios.

Check Performance

Site performance is critical to merchants, especially during the holiday season or an important sales event. They want their shoppers to enjoy a memorable experience, no matter the time of year—or the load on the system.

As the technical architect, it’s your job to make sure that the site you’re implementing runs at peak performance. That means advising the merchant on performance analysis tools and the best ways to approach performance analysis.

Approach Carefully

It’s important that you recommend an approach that meets merchant requirements based on their site’s complexity. Identify test tools for both client and server aspects of the application, so they can obtain the right tools to troubleshoot when performance degrades.

Show admins how to track performance on live sites, especially when installing new code and data, or when running jobs on the same point of delivery (POD) as a live production instance. Remember, a performance hit on one POD instance affects the entire POD. Plan the biggest performance hits for off-hours.

Note

A B2C Commerce POD is a group of compute, storage, and network resources that conform to a standard operating footprint.

Plan for problems. And help the merchant figure out what to do when they happen. Direct them to the customer support problem escalation process and coach them on how to communicate problems and status to others on their implementation team. Be the best example so they can follow your lead.

Identify test tools, track performance, and plan for problems.

Profiling tools can be client- or server-based. Each environment has unique performance considerations. Here are some useful tools.

Let’s take a closer look.

Reports & Dashboards Technical Reports

The Technical Reports dashboard in the B2C Commerce Reports & Dashboard tool provides insight into a site’s server-side technical operations data, including what’s happening with individual controllers or pipelines. Controllers and pipelines process commerce business transactions on the server.

This table shows the reports you can review. They are updated daily and show time as GMT.

Data

Description

Average response time

Review the average response time (in milliseconds) per request, and the response time per day for a selected period. Track controller response time to troubleshoot and optimization resources.

Cache hit ratio

Review how many content requests a cache is able to fill successfully, compared with how many requests it receives. Take a look at these ratios for a selected time period.

  • Cache hit: Percentage of responses retrieved from the web adapter page cache.
  • Cache miss and store: Percentage of responses created by an appserver, marked as cacheable, and stored in the web adapter page cache.
  • Cache miss: Percentage of responses not retrieved from the web adapter page cache.

Non 200–level responses

Review response frequency as a percent of total requests that result in a non 200–level response code (meaning success) for a selected period. Status codes are issued by a server in response to a client request.

Response time distribution

Review the number of requests by response time in 500-millisecond segments. For example, during the dashboard period, a site received 10 million requests. Of those:

  • 7 million had a response time of 0-499 milliseconds.
  • 3 million had a response time of 500-999 milliseconds.

A bar graph shows the number of requests in each response segment, and the percentage of total responses represented.

A peak in response time coupled with a high number of controller requests can indicate a controller issue.

Main controller requests

Review performance metrics for controllers/pipelines for a selected period. Use these metrics to evaluate system performance and isolate controller/pipeline performance issues. Drill down for more details per controller/pipeline.

A controller with a low number of includes but a high total processing time means that you might have an issue with associated include calls.

Include controller request

Review performance metrics for include calls made by a specific controller. Use these metrics to assess the performance of each include call.

Include controller

Review metrics for the include calls made across all controller/pipeline requests for a specified time period. Use these metrics to evaluate performance, and identify issues with include calls.

Note

Click the download icon in the upper right corner of each report to download the data export to a CSV file.

Ask an Account Manager administrator to give you access to the Reports & Dashboards portal by adding a Reports & Dashboard role to your user ID.

Code Profiler

The Code Profiler, found in Business Manager, gives you a view of what’s happening with run-time performance. Code Profiler provides three modes to focus on different levels of detail.

Mode

Description

Performance Impact

Production

Measures run-time behavior for a subset of requests and provides an aggregated view of systems, even under load. This is the default mode for non-sandbox instances and can’t be deactivated.

Minimal

Development

Measures run-time behavior for all requests of the system and provides detailed data per request. This is the default mode for sandbox instances and can be activated for other instance types.

Moderate

Extended script development

Provides insight into script internal run-time behavior, in addition to the information that development mode provides.

Severe

To access Business Manager, you must have a B2C Commerce implementation. In this module, we assume you are a B2C Commerce administrator with the proper permissions to perform these tasks. If you’re not a B2C Commerce administrator, that’s OK. Read along to learn how they would take these steps in a staging instance. Don’t try to follow our steps in your Trailhead Playground. B2C Commerce isn't available in the Trailhead Playground. If you have a staging instance of B2C Commerce, you can try out these steps in your instance. If you don't have a staging instance, ask your manager if there is one that you can use.

Here’s how to use Code Profiler.

  1. Open Business Manager.
  2. Open the storefront for the site you want to examine.
  3. Select Administration > Operations > Code Profiler.
    In Business Manager, the Code Profiler page shows Development mode for the development instance.
  4. Select the mode: Production
    In Business Manager, the Code Profiler page shows Production mode for the production instance.

When you change modes, the server resets the results. If you are collecting data on a sandbox, you must make the behavior occur to measure it. If you are collecting data on a production instance that has sufficient traffic, just wait to see the behavior.

All application servers in a cluster of servers operate in the same mode. A background job exports Code Profiler data hourly into CSV files, which you can download. After the export, the server resets the data. The Code Profiler screen shows data only since the last reset.

Pipeline Profiler

The Pipeline Profiler helps analyze performance problems in the code. Use it during development and load testing. It was created for legacy B2C Commerce implementations that use pipelines, which are code snippets that process business functions. The Pipeline Profiler also works with controllers, which replace pipelines in more current applications. The Profiler user interface supports both; it just gives you the end-point. Look at the code to see whether it’s a controller or a pipeline.

The Pipeline Profiler is activated in Business Manager only for the application server that’s serving that Business Manager session. A user logged in to a Business Manager session served by a different application server can't see it. You can activate it on a production instance for just 15 minutes.

The Pipeline Profiler collects data for controllers/pipelines processed by the application server where it was activated, and only on controllers/pipelines that were invoked after it was activated.

Here’s how to use it.

  1. Open Business Manager.
  2. Open the storefront for the site containing the controller/pipeline you want to examine.
  3. Select Administration > Operations > Pipeline Profiler.
    In Business Manager, the Pipeline Profiler page shows that the profiler is inactive.
  4. On the Pipeline Profiler page, click Green triangle icon to activate the profile.
    The icon changes to Red square icon and the profiler starts to capture data.

Once Profiler starts capturing data, you can review the data by controller/pipeline and template. A pipeline shouldn't take more than three seconds to execute when it includes noncached components, and no more than 250 milliseconds when it includes cached components

Google Lighthouse

Google Lighthouse is an open-source, automated tool for measuring the quality of web pages. You can run it against any web page, whether public or requiring authentication. Google Lighthouse audits performance, accessibility, and search engine optimization of web pages. Use it to track application performance for single users and application performance in high traffic situations. Use it with tools like these for even more details.

Tool

View…

GTmetrix 

Page performance in a summarized report and detailed assessment.

PageSpeed

Page performance of mobile and desktop pages, and suggestions on how to improve a page.

WebPageTest

Deep diagnostic information about how a page performs under a variety of conditions.

Next Steps

In this unit, you explored how to approach site performance and learned about profiling tools. Next, learn about post-launch monitoring.

Resources

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback