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

Date filter #44

Merged
merged 9 commits into from
Jul 11, 2024
Merged

Conversation

shashank-boyapally
Copy link
Contributor

@shashank-boyapally shashank-boyapally commented Jun 25, 2024

Type of change

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

Description

You can now constrain your look-back period using the --lookback option. The format for look-back is XdYh, where X represents the number of days and Y represents the number of hours. Do not merge until #43 gets merged, and fmatch 0.0.8 is released

(venv) sboyapal orion (date-filter) >> orion cmd --hunter-analyze --lookback="10d"
2024-06-25 15:51:47,771 - Orion - INFO - file: orion.py - line: 94 - 🏹 Starting Orion in command-line mode
2024-06-25 15:51:47,773 - Orion - INFO - file: utils.py - line: 213 - The test aws-small-scale-cluster-density-v2 has started
2024-06-25 15:51:47,774 - Matcher - INFO - Executing query against index=ospst-perf-scale-ci-*
2024-06-25 15:51:47,861 - Matcher - INFO - Executing query against index=ospst-perf-scale-ci-*
2024-06-25 15:51:47,891 - Matcher - INFO - Executing query against index=ospst-ripsaw-kube-burner*
2024-06-25 15:51:47,943 - Orion - INFO - file: utils.py - line: 50 - Collecting podReadyLatency
2024-06-25 15:51:47,943 - Matcher - INFO - Executing query against index=ospst-ripsaw-kube-burner*
2024-06-25 15:51:47,991 - Orion - INFO - file: utils.py - line: 50 - Collecting apiserverCPU
2024-06-25 15:51:47,991 - Matcher - INFO - Executing query against index=ospst-ripsaw-kube-burner*
2024-06-25 15:51:49,211 - Orion - INFO - file: utils.py - line: 50 - Collecting ovnCPU
2024-06-25 15:51:49,211 - Matcher - INFO - Executing query against index=ospst-ripsaw-kube-burner*
2024-06-25 15:51:50,568 - Orion - INFO - file: utils.py - line: 50 - Collecting etcdCPU
2024-06-25 15:51:50,568 - Matcher - INFO - Executing query against index=ospst-ripsaw-kube-burner*
2024-06-25 15:51:52,410 - Orion - INFO - file: utils.py - line: 50 - Collecting etcdDisk
2024-06-25 15:51:52,410 - Matcher - INFO - 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-06-17 01:11:35 +0000  22dbe8e9-fe5f-4bc4-976e-2443ad5c5848  https://tinyurl.com/2cfnf4yz                  13000            14.5708        3.55213        9.60174       0.0229627
2024-06-23 13:45:25 +0000  72ae2705-d49c-4107-a552-3609c1c6ea40  https://tinyurl.com/2qpjlbnr                  13000             9.78274       3.33798        7.497         0.015988
2024-06-23 16:19:46 +0000  c322787f-4d2a-4132-ba52-118db655a33b  https://tinyurl.com/2kl88q5w                  13000             9.5838        3.3216         7.24948       0.0158418

Related Tickets & Documents

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.

orion.py Outdated Show resolved Hide resolved
pkg/runTest.py Outdated Show resolved Hide resolved
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
Signed-off-by: Shashank Reddy Boyapally <[email protected]>
@vishnuchalla
Copy link
Collaborator

With the changes in fmatch, looks good to me. I just doubt the SingletonLogger

Copy link
Member

@jtaleric jtaleric left a comment

Choose a reason for hiding this comment

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

lgtm! Tested! Nice work!

Copy link
Collaborator

@paigerube14 paigerube14 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

@shahsahil264 shahsahil264 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
Copy link
Collaborator

With the changes in fmatch, looks good to me. I just doubt the SingletonLogger

Merging the PR for now, as this can be revisited later as an improvement.

@vishnuchalla vishnuchalla merged commit 4ac2900 into cloud-bulldozer:main Jul 11, 2024
2 checks passed
@dry923
Copy link
Member

dry923 commented Jul 11, 2024

so generally LGTM. i just have 1 question. why are we limiting it to just days/hours and not opening it up to "normal" time inputs. ie 1Y2M3h4m2s ? and/or to expand on that allowing a straight date input if you know the cutoff date and dont want to math the days/hours.

@shashank-boyapally
Copy link
Contributor Author

The idea was to have a lookback period, and run orion as a post step of our jobs. The lookback period will act as a sliding window. We can have cutoff date too in the next feature add. And the precision of seconds, since our jobs are atleast 1h apart, I assumed a precision of hours should work, no harm in having it upto seconds too.

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.

6 participants