# Test the speed of an application

You can measure the speed of an application on Azion from two sides. [Edge Pulse](/en/documentation/platform/edge-pulse/) collects what real users' browsers see, and [Real-Time Metrics](/en/documentation/platform/real-time-metrics/) charts what Azion served for every request. To compare a page before and after the move to Azion, refer to the last section.

---

## Prerequisites

- An application served by a workload on Azion. To set them up, refer to [Migrate an application to Azion](/en/documentation/fundamentals/migrate-to-azion/) or [First deploy](/en/documentation/fundamentals/first-deploy/).
- Access to the HTML of the pages you want to monitor, to add the Edge Pulse tag.

---

## Measure what real users see with Edge Pulse

Edge Pulse is Real User Monitoring. A JavaScript tag in your pages collects navigation, availability, latency, and bandwidth data from real visitors' browsers. Each browser tests three addresses of Azion's infrastructure at a time, once every 30 minutes. The collection does not burden the visitor. To add the tag:

1. **Open the Edge Pulse page**

   Access [Azion Console](https://console.azion.com/) > **Edge Pulse**.

2. **Copy the tag**

   Select **Copy to Clipboard** on the tag you need. The **Default Tag** runs after the page loads. The **Pre-loading Tag** is for pages whose Content Security Policy blocks inline JavaScript.

3. **Add the tag to every page you want to monitor**

   Paste it in the HTML of each page, before the closing `body` tag.

4. **Publish the pages**

The browsers of your visitors start sending measurements, and you read the collected data with the GraphQL API that [Real-Time Events](/en/documentation/platform/real-time-events/) serves. For how to send a first query, refer to [GraphQL API first steps](/en/documentation/devtools/graphql/first-steps/).

> **Note**
>
> Edge Pulse respects the Do Not Track setting of the browser. With it on, a new identifier is generated on every visit.

---

## Read the request metrics in Real-Time Metrics

Real-Time Metrics charts every request Azion served, in near real time. For speed, the useful number is how much of the traffic the cache answered without waiting for your origin. To open the charts:

1. **Open Real-Time Metrics**

   Access [Azion Console](https://console.azion.com/) > **Real-Time Metrics**.

2. **Select the Build tab, then Applications**

3. **Compare saved and missed data**

   In the **Data Transferred** subtab, compare **Saved Data** with **Missed Data**. The first is what the cache answered. The second is what reached your origin.

4. **Narrow the period**

   Use the time filters to compare the window before a change with the window after it.

A larger share of saved data after a change means fewer requests waited for your origin.

---

## Compare a page before and after the move

Before you point the domain to Azion, your own computer can reach the application through the `hosts` file. Everyone else still reaches the current provider, so you get the same page from both places. To compare:

1. Load the page from the current provider and note the load time your browser's developer tools report.
2. Stage the application through the `hosts` file. For the steps, refer to [Test an application through the hosts file](/en/documentation/guides/application-development/getting-started/stage-applications-through-hosts-file/).
3. Load the same page twice in a private browser window and keep the second time. The first load fills the cache. The second is what visitors get.

The difference between the two times is what Azion adds for that page. Repeat it with the pages your users open most.

---

## Next steps

- [Cache](/en/documentation/platform/applications.md#cache): Tune the TTL and turn on Tiered Cache so more requests are answered from a copy.
- [Application Accelerator](/en/documentation/platform/applications.md#application-accelerator): Cache dynamic content and rewrite requests on the request path.
- [Image Processor](/en/documentation/platform/applications.md#image-processor): Resize and compress images on the way to the visitor.
- [Minimize downtime](/en/documentation/fundamentals/minimize-downtime.md): Keep the application answering when an origin fails.
