<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Your first performance test on Grafana Labs</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/</link><description>Recent content in Your first performance test on Grafana Labs</description><generator>Hugo -- gohugo.io</generator><language>en</language><atom:link href="/docs/learning-hub/k6-performance-testing/02-your-first-test/index.xml" rel="self" type="application/rss+xml"/><item><title>Your first performance test</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/07-your-first-test-intro/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/07-your-first-test-intro/</guid><content><![CDATA[&lt;h2 id=&#34;your-first-performance-test&#34;&gt;Your first performance test&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What you&amp;rsquo;ll do in this module:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;How k6 runs your test script&lt;/strong&gt; — Virtual users, iterations, and the three parts of a script&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;First test learning path&lt;/strong&gt; — Install k6, write the QuickPizza script, run locally, send to Grafana Cloud k6&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;What k6 measures&lt;/strong&gt; — Built-in metrics in the terminal and in dashboards&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Local vs cloud execution&lt;/strong&gt; — When to reach for &lt;code&gt;k6 run&lt;/code&gt; vs &lt;code&gt;k6 cloud run&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;First test complete&lt;/strong&gt; — Debrief and questions to take into Module 3&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Estimated time:&lt;/strong&gt; 10-15 minutes&lt;/p&gt;
]]></content><description>&lt;h2 id="your-first-performance-test">Your first performance test&lt;/h2>
&lt;p>&lt;strong>What you&amp;rsquo;ll do in this module:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>&lt;strong>How k6 runs your test script&lt;/strong> — Virtual users, iterations, and the three parts of a script&lt;/li>
&lt;li>&lt;strong>First test learning path&lt;/strong> — Install k6, write the QuickPizza script, run locally, send to Grafana Cloud k6&lt;/li>
&lt;li>&lt;strong>What k6 measures&lt;/strong> — Built-in metrics in the terminal and in dashboards&lt;/li>
&lt;li>&lt;strong>Local vs cloud execution&lt;/strong> — When to reach for &lt;code>k6 run&lt;/code> vs &lt;code>k6 cloud run&lt;/code>&lt;/li>
&lt;li>&lt;strong>First test complete&lt;/strong> — Debrief and questions to take into Module 3&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>Estimated time:&lt;/strong> 10-15 minutes&lt;/p></description></item><item><title>How k6 runs your test script</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/08-what-k6-is/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/08-what-k6-is/</guid><content><![CDATA[&lt;h2 id=&#34;how-k6-runs-your-test&#34;&gt;How k6 runs your test&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Virtual users&lt;/strong&gt; (VUs) run your &lt;code&gt;default&lt;/code&gt; function in parallel loops without shared variables. One &lt;strong&gt;iteration&lt;/strong&gt; is one full run of &lt;code&gt;default&lt;/code&gt; by one VU. &lt;strong&gt;Duration&lt;/strong&gt; or &lt;strong&gt;stages&lt;/strong&gt; decide how long VUs keep looping.&lt;/p&gt;
&lt;h2 id=&#34;three-parts-of-a-k6-script&#34;&gt;Three parts of a k6 script&lt;/h2&gt;
&lt;p&gt;A k6 script has up to three parts. In the first learning path, you only use &lt;code&gt;options&lt;/code&gt; and the &lt;code&gt;default&lt;/code&gt; function.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;anatomy-of-a-test.svg&#34;
  alt=&#34;Annotated diagram of a k6 test script structure&#34;/&gt;&lt;/p&gt;
&lt;h3 id=&#34;minimal-example&#34;&gt;Minimal example&lt;/h3&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;JavaScript&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-javascript&#34;&gt;export const options = {
  vus: 10,
  duration: &amp;#39;30s&amp;#39;,
  thresholds: {
    http_req_duration: [&amp;#39;p(95)&amp;lt;500&amp;#39;],
  },
};

export default function () {
  http.get(&amp;#39;https://quickpizza.grafana.com&amp;#39;);
  sleep(1);
}&lt;/code&gt;&lt;/pre&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;options&lt;/code&gt;&lt;/strong&gt; — how hard you push, for how long, and what pass or fail means for the run.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;default&lt;/code&gt;&lt;/strong&gt; — what each virtual user does each iteration: requests and checks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;setup&lt;/code&gt; / &lt;code&gt;teardown&lt;/code&gt;&lt;/strong&gt; &lt;em&gt;(optional)&lt;/em&gt; — one-time shared prep and cleanup, for tokens or test data. Refer to &lt;a href=&#34;/docs/k6/latest/using-k6/test-lifecycle/&#34;&gt;Test lifecycle&lt;/a&gt; when a later script needs them.&lt;/li&gt;
&lt;/ul&gt;
]]></content><description>&lt;h2 id="how-k6-runs-your-test">How k6 runs your test&lt;/h2>
&lt;p>&lt;strong>Virtual users&lt;/strong> (VUs) run your &lt;code>default&lt;/code> function in parallel loops without shared variables. One &lt;strong>iteration&lt;/strong> is one full run of &lt;code>default&lt;/code> by one VU. &lt;strong>Duration&lt;/strong> or &lt;strong>stages&lt;/strong> decide how long VUs keep looping.&lt;/p></description></item><item><title>First test learning path</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/12-first-test-path/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/12-first-test-path/</guid><content><![CDATA[&lt;h2 id=&#34;learning-path-run-your-first-k6-performance-test&#34;&gt;Learning path: Run your first k6 performance test&lt;/h2&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Step&lt;/th&gt;
              &lt;th&gt;What you&amp;rsquo;ll do&lt;/th&gt;
              &lt;th&gt;Outcome&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;1. Install k6&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Download and install the k6 CLI&lt;/td&gt;
              &lt;td&gt;k6 available in your terminal&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;2. Write a test script&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Create a JavaScript file with HTTP requests and checks&lt;/td&gt;
              &lt;td&gt;A complete test script&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;3. Run locally&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Execute &lt;code&gt;k6 run test.js&lt;/code&gt; and read the output&lt;/td&gt;
              &lt;td&gt;Terminal metrics: latency, throughput, errors&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;4. Connect to Grafana Cloud&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Authorize the CLI with a Grafana Cloud k6 API token (&lt;code&gt;k6 cloud login&lt;/code&gt;)&lt;/td&gt;
              &lt;td&gt;Ready for Grafana Cloud k6&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;5. Run on Grafana Cloud k6&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Execute &lt;code&gt;k6 cloud run test.js&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Stored run in Grafana Cloud k6 dashboards&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;before-you-start&#34;&gt;Before you start&lt;/h2&gt;
&lt;p&gt;Have these ready before you open the path (the path itself installs k6 and walks through the script):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Terminal, code editor, and your Grafana Cloud account&lt;/li&gt;
&lt;li&gt;Targets QuickPizza only in this path (not your production systems)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optional — help with the script:&lt;/strong&gt; In Grafana Cloud, use &lt;strong&gt;Grafana Assistant&lt;/strong&gt; in &lt;strong&gt;k6 Script Authoring&lt;/strong&gt; mode to draft or refine the JavaScript before you run locally. Refer to &lt;a href=&#34;/docs/grafana-cloud/testing/k6/author-run/k6-script-authoring-mode/&#34;&gt;Use k6 Script Authoring mode&lt;/a&gt;; the &lt;a href=&#34;../../01-intro/06-prerequisites/&#34;&gt;Prerequisites&lt;/a&gt; slide summarizes access, when &lt;strong&gt;Assistant&lt;/strong&gt; is not visible, and an &lt;strong&gt;example prompt&lt;/strong&gt; you can paste. Use Assistant output as a &lt;strong&gt;draft&lt;/strong&gt; and match the path’s &lt;code&gt;script.js&lt;/code&gt; before &lt;strong&gt;&lt;code&gt;k6 run&lt;/code&gt;&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;









  
    
  
  
&lt;div class=&#34;learning-path-card&#34;&gt;
  




  
  
    
  


&lt;div class=&#34;pathway-row__label mb-1&#34;&gt;
  
  &lt;svg width=&#34;40&#34; height=&#34;40&#34; viewBox=&#34;0 0 40 40&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;&lt;rect x=&#34;0.5&#34; y=&#34;0.5&#34; width=&#34;39&#34; height=&#34;39&#34; rx=&#34;3.5&#34; fill=&#34;white&#34; stroke=&#34;#D8D8DF&#34;&gt;&lt;/rect&gt;&lt;path d=&#34;M8 20H14C16.5 20 18.5 18 18.5 15.5V12&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M8 20H14C16.5 20 18.5 22 18.5 24.5V28&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;&lt;/path&gt;&lt;path d=&#34;M14 20H32&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;&lt;/path&gt;&lt;circle cx=&#34;18.5&#34; cy=&#34;12&#34; r=&#34;2&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; fill=&#34;white&#34;&gt;&lt;/circle&gt;&lt;circle cx=&#34;18.5&#34; cy=&#34;28&#34; r=&#34;2&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; fill=&#34;white&#34;&gt;&lt;/circle&gt;&lt;path d=&#34;M29 17L32 20L29 23&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;2&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;&gt;&lt;/path&gt;&lt;/svg&gt;

  Learning path
&lt;/div&gt;

&lt;h4&gt;Run your first k6 performance test&lt;/h4&gt;
&lt;p&gt;Welcome to the Grafana learning path that shows you how to write, run, and analyze your first k6 performance test, from installation to visualizing results in Grafana Cloud.&lt;/p&gt;

&lt;div class=&#34;d-sm-flex gap-half mb-2&#34;&gt;
  &lt;div class=&#34;d-flex align-items-center gap-half text-gray-12 mt-half body-small&#34;&gt;
    &lt;div class=&#34;journey-list__icon&#34;&gt;
  &lt;svg width=&#34;24&#34; height=&#34;24&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M11.9995 22.5039C17.7985 22.5039 22.4995 17.8029 22.4995 12.0039C22.4995 6.20492 17.7985 1.50391 11.9995 1.50391C6.20052 1.50391 1.49951 6.20492 1.49951 12.0039C1.49951 17.8029 6.20052 22.5039 11.9995 22.5039Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M11.9995 12.0039V8.25391&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M11.9995 12.0078L16.6865 16.6958&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;
&lt;/div&gt;
    &lt;span&gt;15 min&lt;/span&gt;
  &lt;/div&gt;
  
  &lt;div class=&#34;d-flex align-items-center gap-half text-gray-12 mt-half body-small&#34;&gt;
    &lt;div class=&#34;journey-list__icon&#34;&gt;
  &lt;svg width=&#34;24&#34; height=&#34;25&#34; viewBox=&#34;0 0 24 25&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M0.75 9.83984C0.75 7.6307 2.54086 5.83984 4.75 5.83984H19.25C21.4591 5.83984 23.25 7.6307 23.25 9.83984V19.1198C23.25 21.329 21.4591 23.1198 19.25 23.1198H4.75C2.54086 23.1198 0.75 21.329 0.75 19.1198V9.83984Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M14.25 1.52344H9.75C8.92157 1.52344 8.25 2.16815 8.25 2.96344V5.84344H15.75V2.96344C15.75 2.16815 15.0784 1.52344 14.25 1.52344Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M12 15.923C12.8284 15.923 13.5 15.2783 13.5 14.483C13.5 13.6877 12.8284 13.043 12 13.043C11.1716 13.043 10.5 13.6877 10.5 14.483C10.5 15.2783 11.1716 15.923 12 15.923Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M13.2742 8.91315L13.7162 10.309C13.8671 10.7897 14.3806 11.0756 14.8902 10.9628L16.3622 10.6354C16.9349 10.5115 17.5249 10.7602 17.8175 11.2488C18.11 11.7374 18.037 12.3519 17.6372 12.7647L16.6062 13.8312C16.2493 14.1997 16.2493 14.7703 16.6062 15.1388L17.6372 16.2053C18.0379 16.6179 18.1115 17.2331 17.8188 17.7222C17.526 18.2113 16.9353 18.4601 16.3622 18.3356L14.8902 18.0082C14.3806 17.8953 13.8671 18.1812 13.7162 18.662L13.2742 20.0559C13.1055 20.5961 12.5877 20.9661 12.0002 20.9661C11.4128 20.9661 10.8949 20.5961 10.7262 20.0559L10.2842 18.661C10.1333 18.1803 9.61982 17.8944 9.11021 18.0072L7.63821 18.3346C7.06469 18.4597 6.47325 18.2109 6.18034 17.7213C5.88742 17.2317 5.96161 16.6159 6.36321 16.2034L7.39421 15.1368C7.75116 14.7684 7.75116 14.1978 7.39421 13.8293L6.36321 12.7628C5.96346 12.35 5.89039 11.7354 6.18296 11.2468C6.47553 10.7582 7.06551 10.5096 7.63821 10.6335L9.11021 10.9608C9.61923 11.0739 10.1324 10.7889 10.2842 10.309L10.7262 8.91507C10.8944 8.37473 11.412 8.00435 11.9995 8.00391C12.5869 8.00346 13.1051 8.37307 13.2742 8.91315V8.91315Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;
&lt;/div&gt;
    &lt;span&gt;Beginner&lt;/span&gt;
  &lt;/div&gt;
  
  
  &lt;div class=&#34;d-flex align-items-center gap-half text-gray-12 mt-half body-small&#34;&gt;
    &lt;div class=&#34;journey-list__icon&#34;&gt;
  &lt;svg width=&#34;24&#34; height=&#34;24&#34; viewBox=&#34;0 0 24 24&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
  &lt;path fill-rule=&#34;evenodd&#34; clip-rule=&#34;evenodd&#34; d=&#34;M0.75 2.75C0.75 1.64543 1.64543 0.75 2.75 0.75H21.25C22.3546 0.75 23.25 1.64543 23.25 2.75V21.25C23.25 22.3546 22.3546 23.25 21.25 23.25H2.75C1.64543 23.25 0.75 22.3546 0.75 21.25V2.75Z&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M12 4.5L7.5 10.5L4.5 7.5&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M14.25 8.25H18.75&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M12 13.5L7.5 19.5L4.5 16.5&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
  &lt;path d=&#34;M14.25 17.25H18.75&#34; stroke=&#34;#FF671D&#34; stroke-width=&#34;1.5&#34; stroke-linecap=&#34;round&#34; stroke-linejoin=&#34;round&#34;/&gt;
&lt;/svg&gt;
&lt;/div&gt;
    &lt;span&gt;Docs &amp;amp; blog posts&lt;/span&gt;
  &lt;/div&gt;
  
&lt;/div&gt;







  


&lt;div class=&#34;orange-outline-list br-12 border-color-orange-flat border-width-2 p-1-5 pb-1&#34; x3-data=&#34;selectStack(&#39;/docs/learning-paths/run-first-k6-test&#39;)&#34;&gt;
  &lt;div class=&#34;icon-heading d-flex&#34;&gt;
    &lt;div class=&#34;icon-heading__container&#34;&gt;
  &lt;svg width=&#34;30&#34; height=&#34;30&#34; viewBox=&#34;0 0 25 26&#34; fill=&#34;none&#34; xmlns=&#34;http://www.w3.org/2000/svg&#34;&gt;
  &lt;path d=&#34;M16.1401 14.4402C16.2141 14.4402 16.2852 14.4101 16.3373 14.3581C16.5355 14.1569 21.1904 9.39886 21.1904 5.0513C21.1904 2.26537 18.924 0 16.1391 0C13.3541 0 11.0878 2.26537 11.0878 5.0513C11.0878 9.39886 15.7427 14.1569 15.9419 14.3581C15.9939 14.4111 16.065 14.4402 16.1401 14.4402ZM13.5814 5.0513C13.5814 3.63882 14.7266 2.49262 16.1401 2.49262C17.5536 2.49262 18.6978 3.63781 18.6978 5.0513C18.6978 6.46478 17.5526 7.60999 16.1401 7.60999C14.7276 7.60999 13.5814 6.46478 13.5814 5.0513Z&#34; fill=&#34;#FF671D&#34;/&gt;
  &lt;path d=&#34;M24.9034 21.9305C24.0595 18.9113 17.9561 17.4147 12.5704 16.0933C9.54023 15.3496 5.76827 14.4246 5.73524 13.6037C5.72823 13.4225 5.97949 12.7398 9.52922 11.5516C9.80551 11.4585 9.96668 11.1842 9.91262 10.8989C9.85856 10.6136 9.60229 10.4164 9.318 10.4304C4.13956 10.6807 0.501743 12.1602 0.0482666 14.1993C-0.172966 15.1944 0.26149 16.749 3.58398 18.5009L4.29773 18.8763C6.54509 20.0545 8.16879 20.9064 8.1808 21.6992C8.19482 22.6502 5.93745 24.0507 3.72713 25.296C3.58398 25.3761 3.5139 25.5433 3.55495 25.7024C3.59699 25.8616 3.74014 25.9717 3.90431 25.9717H23.0354C23.1315 25.9717 23.2226 25.9337 23.2907 25.8656C24.6971 24.4581 25.2397 23.1347 24.9034 21.9305Z&#34; fill=&#34;#FBC55A&#34;/&gt;
&lt;/svg&gt;
&lt;/div&gt;
    &lt;div class=&#34;no-anchor-heading&#34;&gt;
      &lt;h4&gt;Open in Grafana Cloud&lt;/h4&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class=&#34;mt-1&#34;&gt;
    &lt;p class=&#34;mb-1 maxw-650&#34;&gt;
      
        Complete this learning path directly in your Grafana Cloud stack with an interactive learning experience.
      
    &lt;/p&gt;
    &lt;div class=&#34;d-flex column-gap-1 justify-content-end&#34;&gt;
      &lt;a
        x3-bind:href=&#34;launchUrl&#34;
        class=&#34;btn btn--primary br-8&#34;
        target=&#34;_blank&#34;
        x3-on:click=&#34;trackPathfinderClick(&#39;run-first-k6-test&#39;, &#39;Run your first k6 performance test&#39;)&#34;&gt;
        Open in Grafana Cloud
      &lt;/a&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;div class=&#34;mt-1&#34;&gt;
  &lt;a
    href=&#34;/docs/learning-paths/run-first-k6-test/&#34;
    target=&#34;_blank&#34;
    rel=&#34;noopener noreferrer&#34;
    class=&#34;btn btn--outline arrow w-100p br-8&#34;
    x3-on:click=&#34;$dispatch(&#39;track-view-on-website&#39;, {
      pathId: &#39;run-first-k6-test&#39;,
      pathTitle: &#39;Run your first k6 performance test&#39;
    })&#34;&gt;
    View on website
  &lt;/a&gt;
&lt;/div&gt;

&lt;/div&gt;



]]></content><description>&lt;h2 id="learning-path-run-your-first-k6-performance-test">Learning path: Run your first k6 performance test&lt;/h2>
&lt;section class="expand-table-wrapper">&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Step&lt;/th>
&lt;th>What you&amp;rsquo;ll do&lt;/th>
&lt;th>Outcome&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;strong>1. Install k6&lt;/strong>&lt;/td>
&lt;td>Download and install the k6 CLI&lt;/td>
&lt;td>k6 available in your terminal&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>2. Write a test script&lt;/strong>&lt;/td>
&lt;td>Create a JavaScript file with HTTP requests and checks&lt;/td>
&lt;td>A complete test script&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>3. Run locally&lt;/strong>&lt;/td>
&lt;td>Execute &lt;code>k6 run test.js&lt;/code> and read the output&lt;/td>
&lt;td>Terminal metrics: latency, throughput, errors&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>4. Connect to Grafana Cloud&lt;/strong>&lt;/td>
&lt;td>Authorize the CLI with a Grafana Cloud k6 API token (&lt;code>k6 cloud login&lt;/code>)&lt;/td>
&lt;td>Ready for Grafana Cloud k6&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;strong>5. Run on Grafana Cloud k6&lt;/strong>&lt;/td>
&lt;td>Execute &lt;code>k6 cloud run test.js&lt;/code>&lt;/td>
&lt;td>Stored run in Grafana Cloud k6 dashboards&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="before-you-start">Before you start&lt;/h2>
&lt;p>Have these ready before you open the path (the path itself installs k6 and walks through the script):&lt;/p></description></item><item><title>What k6 measures</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/10-what-k6-measures/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/10-what-k6-measures/</guid><content><![CDATA[&lt;h2 id=&#34;built-in-metrics&#34;&gt;Built-in metrics&lt;/h2&gt;
&lt;p&gt;k6 collects these metrics automatically for every HTTP request.&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Metric&lt;/th&gt;
              &lt;th&gt;What it measures&lt;/th&gt;
              &lt;th&gt;Why it matters&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_req_duration&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Time from request start to response end&lt;/td&gt;
              &lt;td&gt;The primary measure of response speed&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_reqs&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Total requests and requests per second&lt;/td&gt;
              &lt;td&gt;Your throughput under load&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;http_req_failed&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Percentage of requests that returned errors&lt;/td&gt;
              &lt;td&gt;Error rate under load&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;code&gt;checks&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;Pass rate of response assertions&lt;/td&gt;
              &lt;td&gt;Whether responses are correct, not just fast&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;prefer-percentiles-for-gates&#34;&gt;Prefer percentiles for gates&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;p95&lt;/strong&gt; and &lt;strong&gt;p99&lt;/strong&gt; describe tail latency: how slow the slowest slice of requests were. Prefer them over &lt;strong&gt;avg&lt;/strong&gt;, which can hide slow outliers. For pass/fail limits — the kind of target you might write into a service-level objective (SLO), like &amp;ldquo;95% of requests under 500ms&amp;rdquo; — start from &lt;strong&gt;p95&lt;/strong&gt; on &lt;code&gt;http_req_duration&lt;/code&gt;, then add &lt;strong&gt;p99&lt;/strong&gt; when tail risk matters (payments, auth, checkout). Full metric definitions and extra aggregates live in &lt;a href=&#34;/docs/k6/latest/using-k6/metrics/reference/#http&#34;&gt;HTTP metrics&lt;/a&gt; in the k6 docs.&lt;/p&gt;
&lt;h2 id=&#34;when-the-numbers-look-wrong&#34;&gt;When the numbers look wrong&lt;/h2&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Symptom&lt;/th&gt;
              &lt;th&gt;First place to look&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;You doubled VUs but RPS barely moved&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Requests taking longer (&lt;code&gt;http_req_duration&lt;/code&gt;), long &lt;code&gt;sleep&lt;/code&gt;, or many requests per iteration eating the window&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Errors spike with load&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Saturation in the system under test, rate limits, or a script assumption (wrong header, shared test user)&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;You need one login for many VUs&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;setup()&lt;/code&gt; to fetch a token once, pass data into VUs; still no shared mutable state between VUs&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;If you doubled VUs but requests per second barely moved, the links below explain why iteration pacing and open versus closed load models matter. Refer to &lt;a href=&#34;/docs/k6/latest/testing-guides/api-load-testing/#request-rate&#34;&gt;Request rate&lt;/a&gt; and &lt;a href=&#34;/docs/k6/latest/using-k6/scenarios/concepts/open-vs-closed/&#34;&gt;open vs closed models&lt;/a&gt;. For any run, anchor on &lt;a href=&#34;/docs/k6/latest/using-k6/metrics/reference/#http&#34;&gt;&lt;code&gt;http_req_duration&lt;/code&gt;&lt;/a&gt; and the summary tables.&lt;/p&gt;
&lt;h2 id=&#34;think-about-it&#34;&gt;Think about it&lt;/h2&gt;
&lt;p&gt;Pick one endpoint you might baseline later and a rough “too slow” number. You will reuse that intuition when you set thresholds in Module 3.&lt;/p&gt;
]]></content><description>&lt;h2 id="built-in-metrics">Built-in metrics&lt;/h2>
&lt;p>k6 collects these metrics automatically for every HTTP request.&lt;/p>
&lt;section class="expand-table-wrapper">&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Metric&lt;/th>
&lt;th>What it measures&lt;/th>
&lt;th>Why it matters&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>&lt;code>http_req_duration&lt;/code>&lt;/td>
&lt;td>Time from request start to response end&lt;/td>
&lt;td>The primary measure of response speed&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>http_reqs&lt;/code>&lt;/td>
&lt;td>Total requests and requests per second&lt;/td>
&lt;td>Your throughput under load&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>http_req_failed&lt;/code>&lt;/td>
&lt;td>Percentage of requests that returned errors&lt;/td>
&lt;td>Error rate under load&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>&lt;code>checks&lt;/code>&lt;/td>
&lt;td>Pass rate of response assertions&lt;/td>
&lt;td>Whether responses are correct, not just fast&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="prefer-percentiles-for-gates">Prefer percentiles for gates&lt;/h2>
&lt;p>&lt;strong>p95&lt;/strong> and &lt;strong>p99&lt;/strong> describe tail latency: how slow the slowest slice of requests were. Prefer them over &lt;strong>avg&lt;/strong>, which can hide slow outliers. For pass/fail limits — the kind of target you might write into a service-level objective (SLO), like &amp;ldquo;95% of requests under 500ms&amp;rdquo; — start from &lt;strong>p95&lt;/strong> on &lt;code>http_req_duration&lt;/code>, then add &lt;strong>p99&lt;/strong> when tail risk matters (payments, auth, checkout). Full metric definitions and extra aggregates live in &lt;a href="/docs/k6/latest/using-k6/metrics/reference/#http">HTTP metrics&lt;/a> in the k6 docs.&lt;/p></description></item><item><title>Local vs cloud execution</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/11-local-vs-cloud/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/11-local-vs-cloud/</guid><content><![CDATA[&lt;h2 id=&#34;when-to-reach-for-each&#34;&gt;When to reach for each&lt;/h2&gt;
&lt;p&gt;You ran both &lt;strong&gt;&lt;code&gt;k6 run&lt;/code&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;code&gt;k6 cloud run&lt;/code&gt;&lt;/strong&gt; in the path. Most teams use both: iterate locally, then promote to &lt;strong&gt;Grafana Cloud k6&lt;/strong&gt; when a script is ready to keep around. The table below is the cheat sheet for choosing between them next time.&lt;/p&gt;
&lt;p&gt;&lt;img
  class=&#34;lazyload d-inline-block&#34;
  data-src=&#34;local-vs-cloud.svg&#34;
  alt=&#34;Local execution vs Grafana Cloud k6 comparison&#34;/&gt;&lt;/p&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;&lt;/th&gt;
              &lt;th&gt;Local execution&lt;/th&gt;
              &lt;th&gt;Grafana Cloud k6&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Command&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k6 run test.js&lt;/code&gt;&lt;/td&gt;
              &lt;td&gt;&lt;code&gt;k6 cloud run test.js&lt;/code&gt;&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Where load runs&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Your machine&lt;/td&gt;
              &lt;td&gt;Grafana Cloud k6 infrastructure&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Terminal summary (session-only unless you add an output)&lt;/td&gt;
              &lt;td&gt;Stored in Grafana Cloud with dashboards&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;None by default&lt;/td&gt;
              &lt;td&gt;Compare runs over time&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Collaboration&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Share logs manually&lt;/td&gt;
              &lt;td&gt;Share dashboards and links&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;strong&gt;Best for&lt;/strong&gt;&lt;/td&gt;
              &lt;td&gt;Script development, quick checks&lt;/td&gt;
              &lt;td&gt;Team baselines, CI artifacts, trend analysis&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;p&gt;For optional output modes (for example streaming a local run to Grafana Cloud), refer to &lt;a href=&#34;/docs/k6/latest/results-output/&#34;&gt;k6 results output&lt;/a&gt; and &lt;a href=&#34;/docs/grafana-cloud/testing/k6/&#34;&gt;Grafana Cloud k6&lt;/a&gt;.&lt;/p&gt;
]]></content><description>&lt;h2 id="when-to-reach-for-each">When to reach for each&lt;/h2>
&lt;p>You ran both &lt;strong>&lt;code>k6 run&lt;/code>&lt;/strong> and &lt;strong>&lt;code>k6 cloud run&lt;/code>&lt;/strong> in the path. Most teams use both: iterate locally, then promote to &lt;strong>Grafana Cloud k6&lt;/strong> when a script is ready to keep around. The table below is the cheat sheet for choosing between them next time.&lt;/p></description></item><item><title>First test complete</title><link>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/13-first-test-debrief/</link><pubDate>Fri, 05 Jun 2026 12:46:32 -0400</pubDate><guid>https://grafana.com/docs/learning-hub/k6-performance-testing/02-your-first-test/13-first-test-debrief/</guid><content><![CDATA[&lt;h2 id=&#34;first-test-complete&#34;&gt;First test complete!&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;What you accomplished:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Installed k6 on your machine&lt;/li&gt;
&lt;li&gt;Wrote a test script with HTTP requests and checks&lt;/li&gt;
&lt;li&gt;Ran a test locally and read the terminal output&lt;/li&gt;
&lt;li&gt;Sent results to Grafana Cloud k6&lt;/li&gt;
&lt;li&gt;Analyzed response time, throughput, and error rate in dashboards&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;skills-unlocked&#34;&gt;Skills unlocked&lt;/h2&gt;
&lt;section class=&#34;expand-table-wrapper&#34;&gt;&lt;div class=&#34;responsive-table-wrapper&#34;&gt;
    &lt;table&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Skill&lt;/th&gt;
              &lt;th&gt;You can now&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Script writing&lt;/td&gt;
              &lt;td&gt;Write k6 test scripts in JavaScript&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Local execution&lt;/td&gt;
              &lt;td&gt;Run tests from the terminal and read results&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Cloud reporting&lt;/td&gt;
              &lt;td&gt;Stream results to Grafana Cloud for dashboards and history&lt;/td&gt;
          &lt;/tr&gt;
          &lt;tr&gt;
              &lt;td&gt;Metric reading&lt;/td&gt;
              &lt;td&gt;Interpret http_req_duration, http_reqs, and checks&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
    &lt;/table&gt;
  &lt;/div&gt;
&lt;/section&gt;&lt;h2 id=&#34;examine-your-results&#34;&gt;Examine your results&lt;/h2&gt;
&lt;p&gt;Before moving on, look at the test results you just produced and consider:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;p95 latency.&lt;/strong&gt; Was it higher or lower than you expected? What in the system or test data could explain that value?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ramp-up vs steady state.&lt;/strong&gt; Did response times change as VUs increased? If yes, what does that suggest about capacity or queueing?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check pass rate.&lt;/strong&gt; Were all checks at 100%? If any failed, what response shape or timing would explain it?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Your own system.&lt;/strong&gt; If you tested your own endpoint instead of QuickPizza, what p95 would you call too slow for that route?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These notes feed the threshold choices you will make in the next module.&lt;/p&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;What&amp;rsquo;s next&lt;/h2&gt;
&lt;p&gt;You have test results, but no way to know if they&amp;rsquo;re &amp;ldquo;good.&amp;rdquo; In the next module, you&amp;rsquo;ll define what good looks like by establishing a performance baseline with automated pass/fail thresholds.&lt;/p&gt;
]]></content><description>&lt;h2 id="first-test-complete">First test complete!&lt;/h2>
&lt;p>&lt;strong>What you accomplished:&lt;/strong>&lt;/p>
&lt;ul>
&lt;li>Installed k6 on your machine&lt;/li>
&lt;li>Wrote a test script with HTTP requests and checks&lt;/li>
&lt;li>Ran a test locally and read the terminal output&lt;/li>
&lt;li>Sent results to Grafana Cloud k6&lt;/li>
&lt;li>Analyzed response time, throughput, and error rate in dashboards&lt;/li>
&lt;/ul>
&lt;h2 id="skills-unlocked">Skills unlocked&lt;/h2>
&lt;section class="expand-table-wrapper">&lt;div class="responsive-table-wrapper">
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>Skill&lt;/th>
&lt;th>You can now&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>Script writing&lt;/td>
&lt;td>Write k6 test scripts in JavaScript&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Local execution&lt;/td>
&lt;td>Run tests from the terminal and read results&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Cloud reporting&lt;/td>
&lt;td>Stream results to Grafana Cloud for dashboards and history&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>Metric reading&lt;/td>
&lt;td>Interpret http_req_duration, http_reqs, and checks&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;/div>
&lt;/section>&lt;h2 id="examine-your-results">Examine your results&lt;/h2>
&lt;p>Before moving on, look at the test results you just produced and consider:&lt;/p></description></item></channel></rss>