<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ingest and analyze profile data on Grafana Labs</title><link>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/</link><description>Recent content in Ingest and analyze profile data on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/index.xml" rel="self" type="application/rss+xml"/><item><title>Understand profiling types and their uses in Pyroscope</title><link>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/profiling-types/</link><pubDate>Wed, 11 Mar 2026 09:33:08 +0100</pubDate><guid>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/profiling-types/</guid><content><![CDATA[&lt;h1 id=&#34;understand-profiling-types-and-their-uses-in-pyroscope&#34;&gt;Understand profiling types and their uses in Pyroscope&lt;/h1&gt;
&lt;p&gt;Profiling is an essential tool for understanding and optimizing application performance. In Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application. This guide will explore these types and explain their impact on your program.&lt;/p&gt;
&lt;h2 id=&#34;profiling-types&#34;&gt;Profiling types&lt;/h2&gt;
&lt;p&gt;In Pyroscope, profiling types refer to different dimensions of application performance analysis, focusing on specific aspects like CPU usage, memory allocation, or thread synchronization.&lt;/p&gt;
&lt;h2 id=&#34;available-profile-types&#34;&gt;Available profile types&lt;/h2&gt;
&lt;p&gt;Various languages support different profiling types. Pyroscope supports the following profiling types as of &lt;code&gt;v1.2.0&lt;/code&gt;:&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;button-div&#34;&gt;
      &lt;button class=&#34;expand-table-btn&#34;&gt;Expand table&lt;/button&gt;
    &lt;/div&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Profile Type&lt;/th&gt;
              &lt;th&gt;Go&lt;/th&gt;
              &lt;th&gt;Java&lt;/th&gt;
              &lt;th&gt;.NET&lt;/th&gt;
              &lt;th&gt;Ruby&lt;/th&gt;
              &lt;th&gt;Python&lt;/th&gt;
              &lt;th&gt;Rust&lt;/th&gt;
              &lt;th&gt;Node.js&lt;/th&gt;
              &lt;th&gt;eBPF (Go)&lt;/th&gt;
              &lt;th&gt;eBPF (Python)&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;CPU&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Alloc Objects&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Alloc Space&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Inuse Objects&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Inuse Space&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Goroutines&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Mutex Count&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Mutex Duration&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Block Count&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Block Duration&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Lock Count&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Lock Duration&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Exceptions&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Wall&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Heap&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;Yes&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
              &lt;td&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;cpu-profiling&#34;&gt;CPU profiling&lt;/h2&gt;
&lt;!-- We can link to each of these from within the Pyroscope UI in the little (i) icon. --&gt;
&lt;p&gt;CPU profiling measures the amount of CPU time consumed by different parts of your application code. High CPU usage can indicate inefficient code, leading to poor performance and increased operational costs. It&amp;rsquo;s used to identify and optimize CPU-intensive functions in your application.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To identify and optimize CPU-intensive functions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flamegraph insight&lt;/strong&gt;: The width of blocks indicates the CPU time consumed by each function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png&#34;
  alt=&#34;example flamegraph&#34; width=&#34;1599&#34;
     height=&#34;836&#34;/&gt;&lt;/p&gt;
&lt;p&gt;As you can see here the UI is showing a spike in CPU along with the flamegraph associated with that spike. Often times without profiling you may get similar insights from metrics, but with profiling you have more details into the specific cause of a spike in CPU usage at the line level&lt;/p&gt;
&lt;!-- ## FGprof (for go)
[todo add a link to the docs for fgprof]  --&gt;
&lt;h2 id=&#34;memory-allocation-profiling&#34;&gt;Memory allocation profiling&lt;/h2&gt;
&lt;p&gt;Memory allocation profiling tracks the amount and frequency of memory allocations by the application. Excessive or inefficient memory allocation can lead to memory leaks and high garbage collection overhead, impacting application efficiency.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Alloc Objects, Alloc Space&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: For identifying and optimizing memory usage patterns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flamegraph insight&lt;/strong&gt;: Highlights functions where memory allocation is high&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-memory-leak-2023-11-30.png&#34;
  alt=&#34;memory leak example&#34; width=&#34;1109&#34;
     height=&#34;652&#34;/&gt;&lt;/p&gt;
&lt;p&gt;The timeline shows memory allocations over time and is great for debugging memory related issues. A common example is when a memory leak is created due to improper handling of memory in a function. This can be identified by looking at the timeline and seeing a gradual increase in memory allocations that never goes down. This is a clear indicator of a memory leak.&lt;/p&gt;
&lt;p&gt;Without profiling this is may be something that is exhibited in metrics or OOM logs but with profiling you have more details into the specific function that is allocating the memory which is causiing the leak at the line level.&lt;/p&gt;
&lt;h2 id=&#34;goroutine-profiling&#34;&gt;Goroutine profiling&lt;/h2&gt;
&lt;p&gt;Goroutines are lightweight threads in Go, used for concurrent operations. Goroutine profiling measures the usage and performance of these threads. Poor management can lead to issues like deadlocks and excessive resource usage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: Especially useful in Go applications for concurrency management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flamegraph insight&lt;/strong&gt;: Provides a view of goroutine distribution and issues&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;mutex-profiling&#34;&gt;Mutex profiling&lt;/h2&gt;
&lt;p&gt;Mutex profiling involves analyzing mutex (mutual exclusion) locks, used to prevent simultaneous access to shared resources. Excessive or long-duration mutex locks can cause delays and reduced application throughput.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Mutex Count, Mutex Duration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To optimize thread synchronization and reduce lock contention&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flamegraph insight&lt;/strong&gt;: Shows frequency and duration of mutex operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;block-profiling&#34;&gt;Block profiling&lt;/h2&gt;
&lt;p&gt;Block profiling measures the frequency and duration of blocking operations, where a thread is paused or delayed. Blocking can significantly slow down application processes, leading to performance bottlenecks.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Types&lt;/strong&gt;: Block Count, Block Duration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;When to use&lt;/strong&gt;: To identify and reduce blocking delays&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flamegraph insight&lt;/strong&gt;: Identifies where and how long threads are being blocked&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- # Next Steps: Exploring Pyroscope&#39;s UI(link to ui analysis docs) --&gt;
]]></content><description>&lt;h1 id="understand-profiling-types-and-their-uses-in-pyroscope">Understand profiling types and their uses in Pyroscope&lt;/h1>
&lt;p>Profiling is an essential tool for understanding and optimizing application performance. In Pyroscope, various profiling types allow for an in-depth analysis of different aspects of your application. This guide will explore these types and explain their impact on your program.&lt;/p></description></item><item><title>Use the Pyroscope UI to explore profiling data</title><link>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/pyroscope-ui/</link><pubDate>Wed, 11 Mar 2026 09:33:08 +0100</pubDate><guid>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/pyroscope-ui/</guid><content><![CDATA[&lt;h1 id=&#34;use-the-pyroscope-ui-to-explore-profiling-data&#34;&gt;Use the Pyroscope UI to explore profiling data&lt;/h1&gt;
&lt;p&gt;Pyroscope&amp;rsquo;s UI is designed to make it easy to visualize and analyze profiling data.
There are several different modes for viewing, analyzing, uploading, and comparing profiling data.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-diff-2023-11-30.png&#34;
  alt=&#34;Screenshots of Pyroscope&amp;rsquo;s UI&#34; width=&#34;1674&#34;
     height=&#34;863&#34;/&gt;&lt;/p&gt;
&lt;p&gt;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:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Time&lt;/dt&gt;
&lt;dd&gt;Profiling data is collected &lt;em&gt;continuously&lt;/em&gt;, providing a time-centric view that allows querying performance data from any point in the past.&lt;/dd&gt;
&lt;dt&gt;Metadata&lt;/dt&gt;
&lt;dd&gt;Profiles are enriched with metadata, adding contextual depth to the performance data.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;These dimensions, coupled with the detailed nature of performance profiles, make continuous profiling a uniquely valuable tool.
Pyroscope&amp;rsquo;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.&lt;/p&gt;
&lt;p&gt;In this UI reference, you&amp;rsquo;ll learn how Pyroscope parallels these other modern observability tools by providing a Prometheus-like querying experience. More importantly, you&amp;rsquo;ll learn how to use Pyroscope&amp;rsquo;s extensive UI features for a deeper insight into your application&amp;rsquo;s performance.&lt;/p&gt;
&lt;h2 id=&#34;key-features-of-the-pyroscope-ui&#34;&gt;Key features of the Pyroscope UI&lt;/h2&gt;
&lt;p&gt;The following sections describe Pyroscope UI capabilities.&lt;/p&gt;
&lt;!-- Add a screenshot with numbered parts for each of the sections described below. --&gt;
&lt;h2 id=&#34;tag-explorer&#34;&gt;Tag Explorer&lt;/h2&gt;
&lt;p&gt;The Tag Explorer page is a vital part of Pyroscope&amp;rsquo;s UI, allowing users to navigate and analyze performance data through tags/labels. This feature is crucial for identifying performance anomalies and understanding the behavior of different application segments under various conditions. We intentionally don&amp;rsquo;t include a query language on this page as we built this page to be as intuitive as possible for users to use the UI to navigate and drill down into which tags are most interesting to them.&lt;/p&gt;
&lt;p&gt;To use the Tag Explorer:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select a tag to view the corresponding profiling data&lt;/li&gt;
&lt;li&gt;Analyze the pie chart and the table of descriptive statistics to determine which tags if any are behaving abnormally&lt;/li&gt;
&lt;li&gt;Select a tag to view the corresponding profiling data&lt;/li&gt;
&lt;li&gt;Make use of the shortcuts to the single, comparison, and diff pages to further identify the root cause of the performance issue
&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-tag-explorer-cpu-2023-11-30.png&#34;
  alt=&#34;tag-explorer-page&#34; width=&#34;3218&#34;
     height=&#34;1846&#34;/&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;single-view&#34;&gt;Single view&lt;/h2&gt;
&lt;p&gt;The Single View page in Pyroscope&amp;rsquo;s UI is built for in-depth profile analysis. Here, you can explore a single flamegraph with multiple viewing options and functionalities:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Table view&lt;/dt&gt;
&lt;dd&gt;Breaks down the profiling data into a sortable table format.&lt;/dd&gt;
&lt;dt&gt;Sandwich view&lt;/dt&gt;
&lt;dd&gt;Displays both the callers and callees for a selected function, offering a comprehensive view of function interactions.&lt;/dd&gt;
&lt;dt&gt;Flamegraph view&lt;/dt&gt;
&lt;dd&gt;Visualizes profiling data in a flamegraph format, allowing easy identification of resource-intensive functions.&lt;/dd&gt;
&lt;dt&gt;Export &amp;amp; share&lt;/dt&gt;
&lt;dd&gt;Options to export the flamegraph for offline analysis or share it via a flamegraph.com link for collaborative review.&lt;/dd&gt;
&lt;/dl&gt;
&lt;!-- Visual Placeholder:** *Screenshots demonstrating each view option in the Single View page.* --&gt;
&lt;p&gt;The screenshot above shows a spike in CPU usage.
Without profiling, we would go from a memory spike to digging through code or guessing what the cause of it is. However, with profiling, you can use the flamegraph and table to see exactly which function is most responsible for the spike. Often this will show up as a single node taking up a noticeably disproportionate width in the flamegraph as seen below with the &amp;ldquo;checkDriverAvailability&amp;rdquo; function.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-single-2023-11-30.png&#34;
  alt=&#34;example-flamegraph&#34; width=&#34;1599&#34;
     height=&#34;836&#34;/&gt;&lt;/p&gt;
&lt;p&gt;However, in some instances it may be a function that is called many times and is taking up a large amount of space in the flamegraph.
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.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/sandwich-view-2023-11-30.png&#34;
  alt=&#34;example-sandwich-view&#34; width=&#34;3170&#34;
     height=&#34;1122&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;comparison-page&#34;&gt;Comparison page&lt;/h3&gt;
&lt;p&gt;The Comparison page facilitates side-by-side comparison of profiles either based on different label sets, different time periods, or both. This feature is extremely valuable for understanding the impact of changes or differences between do distinct queries of your application.&lt;/p&gt;
&lt;p&gt;To run a comparison:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Select two different sets of labels (for exmaple, &lt;code&gt;env:production&lt;/code&gt; vs. &lt;code&gt;env:development&lt;/code&gt;) and or time periods, reflected by the sub-timelines above each flamegraph.&lt;/li&gt;
&lt;li&gt;View the resulting flamegraphs side by side to identify disparities in performance.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;There are many practical use cases for comparison for companies using Pyroscope.
Some examples of labels below expressed as &lt;code&gt;label:value&lt;/code&gt; are:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Feature flags&lt;/dt&gt;
&lt;dd&gt;Compare application performance with &lt;code&gt;feature_flag:a&lt;/code&gt; vs. &lt;code&gt;feature_flag:b&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;Deployment environments&lt;/dt&gt;
&lt;dd&gt;Contrast &lt;code&gt;env:production&lt;/code&gt; vs. &lt;code&gt;env:development&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;Release analysis&lt;/dt&gt;
&lt;dd&gt;Examine &lt;code&gt;commit:release-1&lt;/code&gt; vs. &lt;code&gt;commit:release-2&lt;/code&gt;&lt;/dd&gt;
&lt;dt&gt;Region&lt;/dt&gt;
&lt;dd&gt;Compare &lt;code&gt;region:us-east-1&lt;/code&gt; vs. &lt;code&gt;region:us-west-1&lt;/code&gt;&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Another example where time is more important than labels is when you want to compare two different time periods. For example, in investigating the cause of a memory leak you would see something like the following where the timeline shows an steadily increasing amount of memory allocations over time. This is a clear indicator of a memory leak.&lt;/p&gt;
&lt;p&gt;You can then use the comparison page to compare the memory allocations between two different time periods where allocations were low and where allocations were high which would allow you to identify the function that is causing the memory leak.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-comparison-2023-11-30.png&#34;
  alt=&#34;comparison-ui&#34; width=&#34;3214&#34;
     height=&#34;1836&#34;/&gt;&lt;/p&gt;
&lt;h2 id=&#34;diff-page-identify-changes-with-differential-analysis&#34;&gt;Diff page: Identify changes with differential analysis&lt;/h2&gt;
&lt;p&gt;The Diff page is an extension of the comparison page, crucial for more easily visually showing the differences between two profiling data sets.
It normalizes the data by comparing the percentage of total time spent in each function so that the resulting flamegraph is comparing the &lt;strong&gt;share&lt;/strong&gt; of time spent in each function rather than the absolute amount of time spent in each function.
This is important because it allows you to compare two different queries that may have different total amounts of time spent in each function.&lt;/p&gt;
&lt;p&gt;Similar to a git diff it takes the flamegraphs from the comparison page and highlights the differences between the two flamegraphs where red represents an increase in CPU usage from the baseline to the comparison and green represents a decrease.&lt;/p&gt;
&lt;p&gt;Using the same examples from above, here is a diff between two label sets:
&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;https://grafana.com/static/img/pyroscope/pyroscope-ui-diff-2023-11-30.png&#34;
  alt=&#34;diff-ui&#34; width=&#34;1674&#34;
     height=&#34;863&#34;/&gt;&lt;/p&gt;
&lt;!-- and a diff between two time periods during a introduction of a memory leak:
![memory leak](https://grafana.com/static/img/pyroscope/pyroscope-memory-leak-2023-11-30.png) --&gt;
]]></content><description>&lt;h1 id="use-the-pyroscope-ui-to-explore-profiling-data">Use the Pyroscope UI to explore profiling data&lt;/h1>
&lt;p>Pyroscope&amp;rsquo;s UI is designed to make it easy to visualize and analyze profiling data.
There are several different modes for viewing, analyzing, uploading, and comparing profiling data.&lt;/p></description></item><item><title>Profile CLI</title><link>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/profile-cli/</link><pubDate>Wed, 11 Mar 2026 09:33:08 +0100</pubDate><guid>https://grafana.com/docs/pyroscope/v1.2.x/ingest-and-analyze-profile-data/profile-cli/</guid><content><![CDATA[&lt;h1 id=&#34;profile-cli&#34;&gt;Profile CLI&lt;/h1&gt;
&lt;p&gt;&lt;code&gt;profilecli&lt;/code&gt; is a command-line utility that enables various productivity flows such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Interacting with a running Pyroscope server to upload profiles, query data, and more&lt;/li&gt;
&lt;li&gt;Inspecting &lt;a href=&#34;https://parquet.apache.org/docs/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Parquet&lt;/a&gt; files&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;Hint: Use the &lt;code&gt;help&lt;/code&gt; command (&lt;code&gt;profilecli help&lt;/code&gt;) to get a full list of capabilities as well as additional help information.&lt;/p&gt;&lt;/blockquote&gt;
&lt;h2 id=&#34;install-profile-cli&#34;&gt;Install Profile CLI&lt;/h2&gt;
&lt;p&gt;You can install Profile CLI using a package or by compiling the code.&lt;/p&gt;
&lt;h3 id=&#34;install-using-a-package&#34;&gt;Install using a package&lt;/h3&gt;
&lt;p&gt;On macOS, you can install Profile CLI using &lt;a href=&#34;https://brew.sh&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;HomeBrew&lt;/a&gt;:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;brew install pyroscope-io/brew/profilecli&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;For other platforms, you can manually &lt;a href=&#34;https://github.com/grafana/pyroscope/releases/latest&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;download the &lt;code&gt;profilecli&lt;/code&gt; release asset&lt;/a&gt; for your operating system and architecture and make it executable.&lt;/p&gt;
&lt;p&gt;For example, for Linux with the AMD64 architecture:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Download and extract the package (archive).&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;curl -fL https://github.com/grafana/pyroscope/releases/download/v1.1.5/profilecli_1.1.5_linux_amd64.tar.gz | tar xvz&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make &lt;code&gt;profilecli&lt;/code&gt; executable:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;chmod &amp;#43;x profilecli&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Make &lt;code&gt;profilecli&lt;/code&gt; reachable from anywhere:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;sudo mv profilecli /usr/local/bin&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;build-from-source-code&#34;&gt;Build from source code&lt;/h3&gt;
&lt;p&gt;To build from source code, you must have:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Go installed (&amp;gt; 1.19).&lt;/li&gt;
&lt;li&gt;Either &lt;code&gt;$GOPATH&lt;/code&gt; or &lt;code&gt;$GOBIN&lt;/code&gt; configured and added to your &lt;code&gt;PATH&lt;/code&gt; environment variable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To build the source code:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Clone the repository.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;git clone git@github.com:grafana/pyroscope.git&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the Go install command to build and install the package.&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;cd pyroscope
go install ./cmd/profilecli&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;The command places the &lt;code&gt;profilecli&lt;/code&gt; executable in &lt;code&gt;$GOPATH/bin/&lt;/code&gt; (or &lt;code&gt;$GOBIN/&lt;/code&gt;) and make it available to use.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;common-flags-and-environment-variables&#34;&gt;Common flags and environment variables&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;profilecli&lt;/code&gt; commands that interact with a Pyroscope server require a server URL and optionally authentication details. These can be provided as command-line flags or environment variables.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Server URL&lt;/p&gt;
&lt;p&gt;&lt;code&gt;default: http://localhost:4040&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;--url&lt;/code&gt; flag specifies the server against which the command will run.
If using Grafana Cloud, an example URL could be &lt;code&gt;https://profiles-prod-001.grafana.net&lt;/code&gt;.
For local instances, the URL could look like &lt;code&gt;http://localhost:4040&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Authentication details.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;default: &amp;lt;empty&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;If using Grafana Cloud or authentication is enabled on your Pyroscope server, you will need to provide a username and password using the &lt;code&gt;--username&lt;/code&gt; and &lt;code&gt;--password&lt;/code&gt; flags respectively.
For Grafana Cloud, the username will be the Stack ID and the password the generated API token.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;environment-variable-naming&#34;&gt;Environment variable naming&lt;/h3&gt;
&lt;p&gt;You can use environment variables to avoid passing flags to the command every time you use it, or to protect sensitive information.
Environment variables have a &lt;code&gt;PROFILECLI_&lt;/code&gt; prefix. Here is an example of providing the server URL and credentials for the &lt;code&gt;profilecli&lt;/code&gt; tool:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=&amp;lt;pyroscope_server_url&amp;gt;
export PROFILECLI_USERNAME=&amp;lt;username&amp;gt;
export PROFILECLI_PASSWORD=&amp;lt;password&amp;gt;
# now we can run a profilecli command without specifying the url or credentials:
profilecli &amp;lt;command&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;h2 id=&#34;uploading-a-profile-to-a-pyroscope-server-using-profilecli&#34;&gt;Uploading a profile to a Pyroscope server using &lt;code&gt;profilecli&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;Using &lt;code&gt;profilecli&lt;/code&gt; streamlines the process of uploading profiles to Pyroscope, making it a convenient alternative to manual HTTP requests.&lt;/p&gt;
&lt;h3 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Ensure you have &lt;code&gt;profilecli&lt;/code&gt; installed on your system by following the &lt;a href=&#34;#install-profile-cli&#34;&gt;installation&lt;/a&gt; steps above.&lt;/li&gt;
&lt;li&gt;Have a profile file ready for upload. Note that you can only upload pprof files at this time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;upload-steps&#34;&gt;Upload steps&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Identify the pprof file.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Path to your pprof file: &lt;code&gt;path/to/your/pprof-file.pprof&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Optional: Specify any extra labels.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can add additional labels to your uploaded profile using the &lt;code&gt;--extra-labels&lt;/code&gt; flag.&lt;/li&gt;
&lt;li&gt;You can provide the name of the application that the profile was captured from via the &lt;code&gt;service_name&lt;/code&gt; label (defaults to &lt;code&gt;profilecli-upload&lt;/code&gt;). This will be useful when querying the data via &lt;code&gt;profilecli&lt;/code&gt; or the UI.&lt;/li&gt;
&lt;li&gt;You can use the flag multiple times to add several labels.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Construct and execute the Upload command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Here&amp;rsquo;s a basic command template:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=&amp;lt;pyroscope_server_url&amp;gt;
export PROFILECLI_USERNAME=&amp;lt;username&amp;gt;
export PROFILECLI_PASSWORD=&amp;lt;password&amp;gt;

profilecli upload --extra-labels=&amp;lt;label_name&amp;gt;=&amp;lt;label_value&amp;gt; &amp;lt;pprof_file_path&amp;gt;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example command:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=https://profiles-prod-001.grafana.net
export PROFILECLI_USERNAME=my_username
export PROFILECLI_PASSWORD=my_password

profilecli upload path/to/your/pprof-file.pprof&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example command with extra labels:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=https://profiles-prod-001.grafana.net
export PROFILECLI_USERNAME=my_username
export PROFILECLI_PASSWORD=my_password

profilecli upload \
    --extra-labels=service_name=my_application_name \
    --extra-labels=cluster=us-east \
    path/to/your/pprof-file.pprof&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check for successful upload.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After running the command, you should see a confirmation message indicating a successful upload. If there are any issues, &lt;code&gt;profilecli&lt;/code&gt; provides error messages to help you troubleshoot.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;querying-a-pyroscope-server-using-profilecli&#34;&gt;Querying a Pyroscope server using &lt;code&gt;profilecli&lt;/code&gt;&lt;/h2&gt;
&lt;p&gt;You can use the &lt;code&gt;profilecli query&lt;/code&gt; command to look up the available profiles on a Pyroscope server and read actual profile data. This can be useful for debugging purposes or for integrating profiling in CI pipelines (for example to facilitate &lt;a href=&#34;https://go.dev/doc/pgo&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;profile-guided optimization&lt;/a&gt;).&lt;/p&gt;
&lt;h3 id=&#34;looking-up-available-profiles-on-a-pyroscope-server&#34;&gt;Looking up available profiles on a Pyroscope server&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;profilecli query series&lt;/code&gt; command to look up the available profiles on a Pyroscope server.
By default, it queries the last hour of data, though this can be controlled with the &lt;code&gt;--from&lt;/code&gt; and &lt;code&gt;--to&lt;/code&gt; flags.
You can narrow the results down with the &lt;code&gt;--query&lt;/code&gt; flag. See &lt;code&gt;profilecli help query series&lt;/code&gt; for more information.&lt;/p&gt;
&lt;h4 id=&#34;query-series-steps&#34;&gt;Query series steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Optional: Specify a Query and a Time Range.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can provide a label selector using the &lt;code&gt;--query&lt;/code&gt; flag, for example: &lt;code&gt;--query=&#39;{service_name=&amp;quot;my_application_name&amp;quot;}&#39;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can provide a custom time range using the &lt;code&gt;--from&lt;/code&gt; and &lt;code&gt;--to&lt;/code&gt; flags, for example, &lt;code&gt;--from=&amp;quot;now-3h&amp;quot; --to=&amp;quot;now&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Construct and execute the Query Series command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Here&amp;rsquo;s a basic command template:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=&amp;lt;pyroscope_server_url&amp;gt;
export PROFILECLI_USERNAME=&amp;lt;username&amp;gt;
export PROFILECLI_PASSWORD=&amp;lt;password&amp;gt;

profilecli query series --query=&amp;#39;{&amp;lt;label_name&amp;gt;=&amp;#34;&amp;lt;label_value&amp;gt;&amp;#34;}&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example command:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=https://profiles-prod-001.grafana.net
export PROFILECLI_USERNAME=my_username
export PROFILECLI_PASSWORD=my_password

profilecli query series --query=&amp;#39;{service_name=&amp;#34;my_application_name&amp;#34;}&amp;#39;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example output:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;JSON&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-json&#34;&gt;{
    &amp;#34;__name__&amp;#34;:&amp;#34;memory&amp;#34;,
    &amp;#34;__period_type__&amp;#34;:&amp;#34;space&amp;#34;,
    &amp;#34;__period_unit__&amp;#34;:&amp;#34;bytes&amp;#34;,
    &amp;#34;__profile_type__&amp;#34;:&amp;#34;memory:inuse_objects:count:space:bytes&amp;#34;,
    &amp;#34;__service_name__&amp;#34;:&amp;#34;my_application_name&amp;#34;,
    &amp;#34;__type__&amp;#34;:&amp;#34;inuse_objects&amp;#34;,
    &amp;#34;__unit__&amp;#34;:&amp;#34;count&amp;#34;,
    &amp;#34;cluster&amp;#34;:&amp;#34;eu-west-1&amp;#34;,
    &amp;#34;service_name&amp;#34;:&amp;#34;my_application_name&amp;#34;
 }&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;reading-a-raw-profile-from-a-pyroscope-server&#34;&gt;Reading a raw profile from a Pyroscope server&lt;/h3&gt;
&lt;p&gt;You can use the &lt;code&gt;profilecli query merge&lt;/code&gt; command to retrieve a merged (aggregated) profile from a Pyroscope server.
The command merges all samples found in the profile store for the specified query and time range.
By default it looks for samples within the last hour, though this can be controlled with the &lt;code&gt;--from&lt;/code&gt; and &lt;code&gt;--to&lt;/code&gt; flags. The source data can be narrowed down with the &lt;code&gt;--query&lt;/code&gt; flag in the same way as with the &lt;code&gt;series&lt;/code&gt; command.&lt;/p&gt;
&lt;h4 id=&#34;query-merge-steps&#34;&gt;Query merge steps&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Specify optional flags.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You can provide a label selector using the &lt;code&gt;--query&lt;/code&gt; flag, for example, &lt;code&gt;--query=&#39;{service_name=&amp;quot;my_application_name&amp;quot;}&#39;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can provide a custom time range using the &lt;code&gt;--from&lt;/code&gt; and &lt;code&gt;--to&lt;/code&gt; flags, for example, &lt;code&gt;--from=&amp;quot;now-3h&amp;quot; --to=&amp;quot;now&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;You can specify the profile type via the &lt;code&gt;--profile-type&lt;/code&gt; flag. The available profile types are listed in the output of the &lt;code&gt;profilecli query series&lt;/code&gt; command.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Construct and execute the Query Merge command.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Here&amp;rsquo;s a basic command template:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=&amp;lt;pyroscope_server_url&amp;gt;
export PROFILECLI_USERNAME=&amp;lt;username&amp;gt;
export PROFILECLI_PASSWORD=&amp;lt;password&amp;gt;

profilecli query merge \
    --profile-type=&amp;lt;profile_type&amp;gt; \
    --query=&amp;#39;{&amp;lt;label_name&amp;gt;=&amp;#34;&amp;lt;label_value&amp;gt;&amp;#34;&amp;#39; \
    --from=&amp;#34;&amp;lt;from&amp;gt;&amp;#34; --to=&amp;#34;&amp;lt;to&amp;gt;&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example command:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;export PROFILECLI_URL=https://profiles-prod-001.grafana.net
export PROFILECLI_USERNAME=my_username
export PROFILECLI_PASSWORD=my_password

profilecli query merge \
    --profile-type=memory:inuse_space:bytes:space:bytes \
    --query=&amp;#39;{service_name=&amp;#34;my_application_name&amp;#34;}&amp;#39; \
    --from=&amp;#34;now-1h&amp;#34; --to=&amp;#34;now&amp;#34;&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Example output:&lt;/p&gt;

&lt;div class=&#34;code-snippet &#34;&gt;&lt;div class=&#34;lang-toolbar&#34;&gt;
    &lt;span class=&#34;lang-toolbar__item lang-toolbar__item-active&#34;&gt;Bash&lt;/span&gt;
    &lt;span class=&#34;code-clipboard&#34;&gt;
      &lt;button x-data=&#34;app_code_snippet()&#34; x-init=&#34;init()&#34; @click=&#34;copy()&#34;&gt;
        &lt;img class=&#34;code-clipboard__icon&#34; src=&#34;/media/images/icons/icon-copy-small-2.svg&#34; alt=&#34;Copy code to clipboard&#34; width=&#34;14&#34; height=&#34;13&#34;&gt;
        &lt;span&gt;Copy&lt;/span&gt;
      &lt;/button&gt;
    &lt;/span&gt;
    &lt;div class=&#34;lang-toolbar__border&#34;&gt;&lt;/div&gt;
  &lt;/div&gt;&lt;div class=&#34;code-snippet &#34;&gt;
    &lt;pre data-expanded=&#34;false&#34;&gt;&lt;code class=&#34;language-bash&#34;&gt;level=info msg=&amp;#34;query aggregated profile from profile store&amp;#34; url=http://localhost:4040 from=2023-12-11T13:38:33.115683-04:00 to=2023-12-11T14:38:33.115684-04:00 query={} type=memory:inuse_space:bytes:space:bytes
PeriodType: space bytes
Period: 524288
Time: 2023-12-11 13:59:59.999 -0400 AST
Duration: 59m5
Samples:
inuse_space/bytes[dflt]
  115366240: 107 13 14 15 16 17 1 2 3
...&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
]]></content><description>&lt;h1 id="profile-cli">Profile CLI&lt;/h1>
&lt;p>&lt;code>profilecli&lt;/code> is a command-line utility that enables various productivity flows such as:&lt;/p>
&lt;ul>
&lt;li>Interacting with a running Pyroscope server to upload profiles, query data, and more&lt;/li>
&lt;li>Inspecting &lt;a href="https://parquet.apache.org/docs/" target="_blank" rel="noopener noreferrer">Parquet&lt;/a> files&lt;/li>
&lt;/ul>
&lt;blockquote>
&lt;p>Hint: Use the &lt;code>help&lt;/code> command (&lt;code>profilecli help&lt;/code>) to get a full list of capabilities as well as additional help information.&lt;/p></description></item></channel></rss>