github.com/grafana/pyroscope@v1.18.0/docs/sources/view-and-analyze-profile-data/pyroscope-ui.md (about)

     1  ---
     2  title: Use the Pyroscope UI to explore profiling data
     3  menuTitle: Use the Pyroscope UI
     4  description: How to use the Pyroscope UI to explore profile data.
     5  weight: 200
     6  aliases:
     7    - ../ingest-and-analyze-profile-data/profile-ui/
     8  keywords:
     9    - pyroscope
    10    - performance analysis
    11    - flame graphs
    12  ---
    13  
    14  # Use the Pyroscope UI to explore profiling data
    15  
    16  Pyroscope's UI is designed to make it easy to visualize and analyze profiling data.
    17  There are several different modes for viewing, analyzing, uploading, and comparing profiling data.
    18  
    19  The Pyroscope UI is only available with Pyroscope open source.
    20  In Grafana and Grafana Cloud, you can use [Profiles Drilldown](https://grafana.com/docs/grafana/<GRAFANA_VERSION>/explore/simplified-exploration/profiles/) to inspect your profiling data.
    21  
    22  ![Screenshot of Pyroscope UI](/media/docs/pyroscope/screenshot-pyroscope-comparison-view.png)
    23  
    24  While code profiling has been a long-standing practice, continuous profiling represents a modern and more advanced approach to performance monitoring. This technique adds two critical dimensions to traditional profiles:
    25  
    26  Time
    27  : Profiling data is collected _continuously_, providing a time-centric view that allows querying performance data from any point in the past.
    28  
    29  Metadata
    30  : Profiles are enriched with metadata, adding contextual depth to the performance data.
    31  
    32  These dimensions, coupled with the detailed nature of performance profiles, make continuous profiling a uniquely valuable tool.
    33  Pyroscope's UI enhances this further by offering a convenient platform to analyze profiles and get insights that are impossible to get from using other traditional signals like logs, metrics, or tracing.
    34  
    35  In this UI reference, you'll learn how Pyroscope parallels these other modern observability tools by providing a Prometheus-like querying experience. More importantly, you'll learn how to use Pyroscope's extensive UI features for a deeper insight into your application's performance.
    36  
    37  ## Key features of the Pyroscope UI
    38  
    39  The following sections describe Pyroscope UI capabilities.
    40  
    41  <!-- Add a screenshot with numbered parts for each of the sections described below. -->
    42  
    43  ## Tag Explorer
    44  
    45  The **Tag Explorer** page lets you navigate and analyze performance data through tags and labels.
    46  This feature is crucial for identifying performance anomalies and understanding the behavior of different application segments under various conditions.
    47  Pyroscope intentionally doesn't include a query language on this page.
    48  
    49  ![Pyroscope Tag Explorer](/media/docs/pyroscope/screenshot-pyroscope-tag-explorer.png)
    50  
    51  To use the **Tag Explorer**:
    52  
    53  1. Select a tag to view the corresponding profiling data.
    54  1. Analyze the pie chart and the table of descriptive statistics to determine which tags if any are behaving abnormally.
    55  1. Select a tag to view the corresponding profiling data.
    56  1. Make use of the shortcuts to the Single, Comparison, and Diff View pages to further identify the root cause of the performance issue.
    57  
    58  ## Single view
    59  
    60  The Single View page in Pyroscope's UI is built for in-depth profile analysis. Here, you can explore a single flame graph with multiple viewing options and functionalities:
    61  
    62  **Table view**
    63  : Breaks down the profiling data into a sortable table format. Selecting **Top Table** displays the table and hides the flame graph.
    64  
    65  **Sandwich view**
    66  : Displays both the callers and callees for a selected function, offering a comprehensive view of function interactions. Access by clicking in the flame graph and selecting **Sandwhich view**.
    67  
    68  **Flame Graph** view
    69  : Visualizes profiling data in a flame graph format, allowing easy identification of resource-intensive functions. Selecting **Flame Graph** displays the flame graph and hides the table.
    70  
    71  **Both** view
    72  : Displays both the table and the flame graph. This is the default view for **Single View**.
    73  
    74  **Export Data**
    75  : Options to export the flame graph for offline analysis or share it via a flamegraph.com link for collaborative review.
    76  
    77  <!-- Visual Placeholder:** *Screenshots demonstrating each view option in the Single View page.* -->
    78  
    79  This screenshot shows a spike in CPU usage.
    80  Without profiling, you would go from a spike CPU usage metric to digging through code or guessing the cause.
    81  However, with profiling, you can use the flame graph and table to see exactly which function is most responsible for the spike.
    82  Often, this shows up as a single node taking up a noticeably disproportionate width in the flame graph as seen below with the `checkDriverAvailability` function.
    83  
    84  ![example-flamegraph](https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png)
    85  
    86  However, in some instances it may be a function that's called many times and is taking up a large amount of space in the flame graph.
    87  In this case, you can use the sandwich view to see that a logging function called throughout many functions in the codebase is the culprit.
    88  
    89  ![example-sandwich-view](https://grafana.com/static/img/pyroscope/sandwich-view-2023-11-30.png)
    90  
    91  ## Comparison view
    92  
    93  The Comparison view facilitates side-by-side comparison of profiles either based on different label sets, different time periods, or both.
    94  This feature is valuable for understanding the impact of changes or differences between two distinct queries of your application.
    95  
    96  You can use Comparison view to compare different time ranges whether or not the labels are the same.
    97  For example, in investigating the cause of a memory leak, the timeline might show a steadily increasing amount of memory allocations over time.
    98  You can use the Comparison view to compare the memory allocations between two different time periods where allocations were low and where allocations were high.
    99  This information helps you identify the function that's causing the memory leak.
   100  
   101  ![Pyroscope Comparison view](/media/docs/pyroscope/screenshot-pyroscope-comparison-view.png)
   102  
   103  To run a comparison:
   104  
   105  1. Select two different sets of labels (for example, `env:production` vs. `env:development`) and or time periods, reflected by the sub-timelines above each flame graph.
   106  1. View the resulting flame graphs side by side to identify disparities in performance.
   107  
   108  There are many practical use cases for comparison for companies using Pyroscope.
   109  Some examples of labels below expressed as `label:value` are:
   110  
   111  Feature flags
   112  : Compare application performance with `feature_flag:a` vs. `feature_flag:b`
   113  
   114  Deployment environments
   115  : Contrast `env:production` vs. `env:development`
   116  
   117  Release analysis
   118  : Examine `commit:release-1` vs. `commit:release-2`
   119  
   120  Region
   121  : Compare `region:us-east-1` vs. `region:us-west-1`
   122  
   123  ## Diff page: Identify changes with differential analysis
   124  
   125  The **Diff** page is an extension of the comparison page, crucial for more easily visually showing the differences between two profiling data sets.
   126  It normalizes the data by comparing the percentage of total time spent in each function so that the resulting flame graph is comparing the __share__ of time spent in each function rather than the absolute amount of time spent in each function.
   127  This is important because it allows you to compare two different queries that may have different total amounts of time spent in each function.
   128  
   129  ![Diff view in Pyroscope](/media/docs/pyroscope/screenshot-pyroscope-diff-view.png)
   130  
   131  Similar to a `git diff`, it takes the flame graphs from the comparison page and highlights the differences between the two flame graphs where red represents an increase in CPU usage from the baseline to the comparison and green represents a decrease.
   132  
   133  <!-- and a diff between two time periods during an introduction of a memory leak:
   134  ![memory leak](https://grafana.com/static/img/pyroscope/pyroscope-memory-leak-2023-11-30.png) -->