Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Max lookback #65

Merged
merged 4 commits into from
Sep 13, 2024
Merged

Conversation

shashank-boyapally
Copy link
Contributor

@shashank-boyapally shashank-boyapally commented Aug 19, 2024

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Added to lookback for n number of runs. Do not merge unit fmatch 0.0.9 and #57 is merged

(venv) sboyapal orion (max-lookback) >> orion cmd --hunter-analyze --lookback-size=15
2024-08-19 16:32:00,136 - Orion      - INFO - file: orion.py - line: 116 - 🏹 Starting Orion in command-line mode
2024-08-19 16:32:00,139 - Orion      - INFO - file: utils.py - line: 218 - The test aws-small-scale-cluster-density-v2 has started
2024-08-19 16:32:00,139 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-perf-scale-ci-*
2024-08-19 16:32:00,861 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
2024-08-19 16:32:01,071 - Orion      - INFO - file: utils.py - line: 52 - Collecting podReadyLatency
2024-08-19 16:32:01,071 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
2024-08-19 16:32:01,272 - Orion      - INFO - file: utils.py - line: 52 - Collecting apiserverCPU
2024-08-19 16:32:01,272 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
2024-08-19 16:32:04,082 - Orion      - INFO - file: utils.py - line: 52 - Collecting ovnCPU
2024-08-19 16:32:04,082 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
2024-08-19 16:32:06,093 - Orion      - INFO - file: utils.py - line: 52 - Collecting etcdCPU
2024-08-19 16:32:06,093 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
2024-08-19 16:32:07,905 - Orion      - INFO - file: utils.py - line: 52 - Collecting etcdDisk
2024-08-19 16:32:07,905 - Matcher    - INFO - file: matcher.py - line: 66 - Executing query against index=ospst-ripsaw-kube-burner*
aws-small-scale-cluster-density-v2
==================================
time                       uuid                                  buildUrl                                                                                                                                                                                                                            podReadyLatency_P99    apiserverCPU_avg    ovnCPU_avg    etcdCPU_avg    etcdDisk_avg
-------------------------  ------------------------------------  --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------  ---------------------  ------------------  ------------  -------------  --------------
2024-07-09 02:36:57 +0000  108ae357-69b1-450f-841b-e31192b06124  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-etcdencrypt-24nodes/1810464372661686272                                                            13000             9.23414       2.60243        6.77876       0.015257
2024-07-09 03:57:37 +0000  1992c5cc-14a6-4b9c-821c-9c9190e33fee  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes/1810494340527558656                                                                        13000             9.22411       2.68723        6.44685       0.0164871
2024-07-12 05:59:57 +0000  19cc5420-7874-4a1d-a7a4-145b2cb1e137  https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_release/53778/rehearse-53778-pull-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes-acs/1811616167136071680                  13000            13.6386        2.70217        7.19755       0.0176438
2024-07-12 17:12:09 +0000  61b2585e-bae0-43c6-b20e-7836d82966d0  https://prow.ci.openshift.org/view/gs/test-platform-results/pr-logs/pull/openshift_release/53778/rehearse-53778-pull-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes-acs/1811785760332845056                  13000            13.5351        2.82861        7.47695       0.0153671
2024-07-16 10:30:54 +0000  f7542179-1f7f-49f7-9d97-8d1dd6ce84a4  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-etcdencrypt-24nodes/1813121615911718912                                                            13000             9.19822       2.63155        6.7938        0.0147343
2024-07-16 13:57:59 +0000  1480099e-e108-4ee9-9519-722e63ed87b9  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes/1813182064762032128                                                                        13000             9.08859       2.63408        6.55184       0.0172996
2024-07-17 11:24:00 +0000  040128c5-b39c-43c3-8ca9-dfb9b10e91e9  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-loaded-upgrade-from-4.16-loaded-upgrade-416to417-24nodes/1813514179735195648                                     13000            13.2697        2.49219        8.41471       0.0226731
2024-07-24 11:08:53 +0000  34812eed-0200-4ac1-9312-874706b35730  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-loaded-upgrade-from-4.16-loaded-upgrade-416to417-24nodes/1816050985663991808                                     13000            13.3616        2.52808        8.72798       0.0216129
2024-08-02 10:48:28 +0000  9a52078d-1f01-43bd-8bc3-81e6deb18965  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-etcdencrypt-24nodes/1819282228899745792                                                            13000             9.10756       2.74433        6.59389       0.0149613
2024-08-02 13:46:48 +0000  3384ae7d-8c37-4750-ae36-4d4eb7571bca  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes/1819342668765859840                                                                        13000             9.65455       2.60241        6.97501       0.0139434
2024-08-03 11:04:05 +0000  d4aa2b85-2bcf-4dbb-a6e8-acf3ce184289  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-loaded-upgrade-from-4.16-loaded-upgrade-416to417-24nodes/1819674770665377792                                     13000            13.554         2.55718        8.47033       0.0155697
2024-08-10 10:51:39 +0000  e4555243-7beb-4535-b2aa-271917e2ad0c  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-loaded-upgrade-from-4.16-loaded-upgrade-416to417-24nodes/1822211571330322432                                     13000            13.42          2.55408        8.64175       0.0253407
2024-08-16 10:19:01 +0000  87c6e9ad-6ac5-459e-b5f4-b47108a72414  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-etcdencrypt-24nodes/1824355887179894784                                                            13000             9.18769       2.65559        6.82992       0.0165064
2024-08-16 13:46:53 +0000  7b481c82-438e-4461-a4ac-ea7da4f0b5f3  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.16-nightly-x86-control-plane-24nodes/1824416115749556224                                                                        13000             9.17754       2.72878        6.85646       0.0164923
2024-08-17 11:01:37 +0000  362922df-34ff-44bd-b741-e4a5b437df67  https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-qe-ocp-qe-perfscale-ci-main-aws-4.17-nightly-x86-loaded-upgrade-from-4.16-loaded-upgrade-416to417-24nodes/1824748253506179072                                     13000            13.4152        2.57022        8.58397       0.0172752

Context

This particular feature clashes along with the idea of having to lookback for X number of days. The precedence of both the flags are equal and the it returns the runs until the cutoff whichever is shorter. To provide precedency one can understand the following example:

Consider the following runs

1 -- 21 Aug
2 -- 22 Aug
3 -- 22 Aug
4 -- 22 Aug
5 -- 23 Aug
6 -- 23 Aug
7 -- 24 Aug
8 -- 25 Aug
9 -- 26 Aug

Today is 27 Aug, and
case 1: we want to get data of previous 5 days, the --lookback flag gets us the runs [2,9]
case 2: we want to get data of previous 6 runs, the --lookback-size flag gets us the runs [4,9]
case 3: when we use both --lookback and --lookback-size

  • Consider we pass --lookback 5d --lookback-size 6 now this gets the union of both [2,9] and [4,9] which is [4,9]
  • Consider we pass --lookback 3d --lookback-size 6 now this gets the union of both [7,9] and [4,9] which is [7,9]

This is similar to how car manufacturers warranty plays out such as 5years of 60k miles.

Why we do not want higher precedence for a single flag?

  • These flags are optional to use, if we give higher precedence to a single flag and use both flags the same functionality can be achieved by just passing the single flag(higher precedence) and ignoring the other.
  • In a use case where we would like to just see latest n number of runs and restricted to a date, using both operators can achieve it. Say I want latest 15 runs from past 10 days, this way of having no precedence allows us to have it. If there are more than 15 runs it gets only 15 runs, if there are less than 15 runs it gets the last 10 days runs.

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please describe the System Under Test.
  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
@vishnuchalla
Copy link
Collaborator

After the pre-requisite PR is merged, can you update this one by adding few usage examples with loopback period vs size?

Signed-off-by: Shashank Reddy Boyapally <[email protected]>
@shashank-boyapally shashank-boyapally marked this pull request as ready for review September 11, 2024 19:46
Copy link
Collaborator

@vishnuchalla vishnuchalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vishnuchalla vishnuchalla merged commit a6dd796 into cloud-bulldozer:main Sep 13, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants