Answers: <p>Grafana has option for directly pointing certain timeframe.
  <a href="https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/" rel="nofollow noreferrer">https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/</a></p>
  <p>Save start and end time of your test OR test use fixed test duration added to startime to get endtime(for similar size of images) and compare exactly same grafana view from different time.</p>
  <p>E.g.</p>
  <p>Test1 is executed 1.12.2022 12:45:02 - 1.12.2022 12:47:02</p>
  <p>Test2 is executed 5.12.2022 00:25:02 - 5.12.2022 00:27:02</p>
  <p>Then you get two url ending for exactly same grafana view. It makes possible comparison, but you need to have two browser instances open in parallel.</p>
  
Answers: CC BY-SA 4.0
Answers: 2022-05-20T06:39:43.497Z
Answers: This does not provide an answer to the question. Once you have sufficient [reputation](https://devops.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://devops.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/11754)
Answers: Bruce Becker
Answers: CC BY-SA 4.0
Answers: 2022-05-19T11:42:15.000Z
Answers: 2022-12-05T12:01:52.123Z
Answers: 2022-12-05T12:01:52.123Z
Answers: RunningCartographer
Body: <p>I have an application and system that exposes its resource metrics to Prometheus and Grafana that I want to do performance testing on. I want to be able to conduct a test, capture the metrics on CPU, Memory, File I/O, etc, for a test run, and save them for comparison against another test run. I'll be running multiple tests at different times with different configurations but the resource metrics will be standardized.</p>
  <p>For Example, for two 5 minute tests, Comparing CPU:</p>
  <ul>
  <li>Test 1 - 0:00-5:00
  <ul>
  <li>CPU Graph</li>
  </ul>
  </li>
  <li>Test 2 - 0:00-5:00
  <ul>
  <li>CPU Graph</li>
  </ul>
  </li>
  </ul>
  <p>And then Comparing Memory:</p>
  <ul>
  <li>Test 1 - 0:00-5:00
  <ul>
  <li>Mem Usage Graph</li>
  </ul>
  </li>
  <li>Test 2 - 0:00-5:00
  <ul>
  <li>Mem Usage Graph</li>
  </ul>
  </li>
  </ul>
  <p>Is there a way to save or record these metrics for A/B comparison using Prometheus and Grafana? Or would I be forcing these tools too hard to do something that they really aren't designed to do? If so, is there a better way/tool to capture and compare the data I'm looking for this type of performance testing?</p>
  
Tags: <testing><prometheus><grafana><performance>
Title: Snapshot or Saving Prometheus Data for Performance testing and comparison
UserDisplayName: DogEatDog
ThreadText: # Snapshot or Saving Prometheus Data for Performance testing and comparison
  
  (Asked by: username_0 on 2022-02-12)
  
  I have an application and system that exposes its resource metrics to Prometheus and Grafana that I want to do performance testing on. I want to be able to conduct a test, capture the metrics on CPU, Memory, File I/O, etc, for a test run, and save them for comparison against another test run. I'll be running multiple tests at different times with different configurations but the resource metrics will be standardized.
  
  For Example, for two 5 minute tests, Comparing CPU:
  
  * Test 1 - 0:00-5:00
    + CPU Graph
  * Test 2 - 0:00-5:00
    + CPU Graph
  
  And then Comparing Memory:
  
  * Test 1 - 0:00-5:00
    + Mem Usage Graph
  * Test 2 - 0:00-5:00
    + Mem Usage Graph
  
  Is there a way to save or record these metrics for A/B comparison using Prometheus and Grafana? Or would I be forcing these tools too hard to do something that they really aren't designed to do? If so, is there a better way/tool to capture and compare the data I'm looking for this type of performance testing?
  
  **Tags:** testing, prometheus, grafana, performance
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-05-19. Score: 1
  
  Grafana has option for directly pointing certain timeframe.
  <https://grafana.com/docs/grafana/latest/dashboards/time-range-controls/>
  
  Save start and end time of your test OR test use fixed test duration added to startime to get endtime(for similar size of images) and compare exactly same grafana view from different time.
  
  E.g.
  
  Test1 is executed 1.12.2022 12:45:02 - 1.12.2022 12:47:02
  
  Test2 is executed 5.12.2022 00:25:02 - 5.12.2022 00:27:02
  
  Then you get two url ending for exactly same grafana view. It makes possible comparison, but you need to have two browser instances open in parallel.
  
  > **Comments:**
  > **username_2**: This does not provide an answer to the question. Once you have sufficient [reputation](https://devops.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://devops.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/11754)  
  
  ---
  
  