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

Searchbackpressure Service Reader and UTs added #427

Merged
merged 11 commits into from
Jul 3, 2023

Conversation

CoderJeffrey
Copy link
Contributor

@CoderJeffrey CoderJeffrey commented Jun 22, 2023

Signed-off-by: Jeffrey Liu ujeffliu@amazon.com

Is your feature request related to a problem? Please provide an existing Issue # , or describe.
To fix on issue #424. The PR mainly adds the reader to consume SearchBackPressure Service metrics.

Describe the solution you are proposing
Adds the reader (processor and snapshot) for SearchBackPressureServiceStats and populate the extracted fields into the sqlitedb. Also add the UTs to test both SearchBackPressureMetricsProcessor.java and SearchBackPressureMetricsSnapShot.java.

Describe alternatives you've considered
N/A

Additional context

  1. Parallel PR needs to be approved to pass the Build Test (PR Handling empty flow unit during Cache/Queue RCA execution #34 for the Commons Package) (Constants added for searchbackpressure rca reader to consume searchbackpressure metrics in shared folder performance-analyzer-commons#34). This PR adds the Constants needed by reader to consume metrics in shared folder.

  2. This PR is built upon the changes of the other 2 PR for performance-analyzer and performance-analyzer-commons

Check List

  • New functionality includes testing.
  • All tests pass
  • New functionality has been documented.
  • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…zon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
….com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…liu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…on.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
ansjcy
ansjcy previously approved these changes Jul 3, 2023
@CoderJeffrey CoderJeffrey requested a review from khushbr July 3, 2023 17:17
@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #427 (0bc0d10) into main (efa0fa0) will increase coverage by 0.19%.
The diff coverage is 91.40%.

❗ Current head 0bc0d10 differs from pull request most recent head 16b6db4. Consider uploading reports for the commit 16b6db4 to get more accurate results

@@             Coverage Diff              @@
##               main     #427      +/-   ##
============================================
+ Coverage     75.98%   76.18%   +0.19%     
- Complexity     2581     2601      +20     
============================================
  Files           302      304       +2     
  Lines         15356    15577     +221     
  Branches       1213     1219       +6     
============================================
+ Hits          11669    11867     +198     
- Misses         3193     3211      +18     
- Partials        494      499       +5     
Impacted Files Coverage Δ
...nceanalyzer/rca/store/OpenSearchAnalysisGraph.java 100.00% <ø> (ø)
...rch/performanceanalyzer/reader/MetricsEmitter.java 94.83% <83.33%> (-0.82%) ⬇️
...zer/reader/SearchBackPressureMetricsProcessor.java 89.18% <89.18%> (ø)
...yzer/reader/SearchBackPressureMetricsSnapShot.java 98.63% <98.63%> (ø)
...eanalyzer/rca/framework/metrics/ReaderMetrics.java 97.56% <100.00%> (+0.06%) ⬆️
...ormanceanalyzer/reader/ReaderMetricsProcessor.java 79.33% <100.00%> (+0.61%) ⬆️

... and 3 files with indirect coverage changes

…rey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…OC (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
…y Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
@khushbr
Copy link
Collaborator

khushbr commented Jul 3, 2023

LGTM! Thank you for making this change @CoderJeffrey

@ansjcy ansjcy merged commit 53e3b94 into opensearch-project:main Jul 3, 2023
6 of 7 checks passed
@khushbr khushbr added v2.11.0 Issues targeting release v2.11.0 backport 2.x labels Oct 5, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 5, 2023
* Remove log files and add DCO (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove extra files (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove styling difference (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary file changes (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Use Commons package for metric table naming and column naming (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary comments and add more descriptive comments (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary global variables (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Add comments and adjust UTs (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove tab space and change avg datatype to LONG  (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove tab space and change avg datatype to LONG and additional JAVADOC (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Add description for searchbp stats in sqlitedb (signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

---------

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
(cherry picked from commit 53e3b94)
khushbr pushed a commit that referenced this pull request Oct 5, 2023
* Remove log files and add DCO (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove extra files (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove styling difference (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary file changes (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Use Commons package for metric table naming and column naming (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary comments and add more descriptive comments (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove unnecessary global variables (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Add comments and adjust UTs (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove tab space and change avg datatype to LONG  (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Remove tab space and change avg datatype to LONG and additional JAVADOC (Signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

* Add description for searchbp stats in sqlitedb (signed-off-by: Jeffrey Liu ujeffliu@amazon.com)

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>

---------

Signed-off-by: CoderJeffrey <jliu5021@usc.edu>
(cherry picked from commit 53e3b94)

Co-authored-by: Jeffrey Liu <jliu5021@usc.edu>
khushbr added a commit to khushbr/performance-analyzer-rca that referenced this pull request Oct 6, 2023
khushbr added a commit that referenced this pull request Oct 6, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Oct 6, 2023
khushbr added a commit that referenced this pull request Oct 6, 2023
#504) (#505)

This reverts commit aef3981.

(cherry picked from commit c9fd492)

Co-authored-by: Khushboo Rajput <59671881+khushbr@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x v2.11.0 Issues targeting release v2.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants