Create writer file only if metrics are present#23
Merged
Conversation
Signed-off-by: Sruti Parthiban <partsrut@amazon.com>
khushbr
reviewed
Jun 29, 2021
src/main/java/org/opensearch/performanceanalyzer/collectors/StatExceptionCode.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandler.java
Show resolved
Hide resolved
khushbr
reviewed
Jul 2, 2021
src/main/java/org/opensearch/performanceanalyzer/rca/framework/metrics/WriterMetrics.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/performanceanalyzer/rca/framework/metrics/WriterMetrics.java
Outdated
Show resolved
Hide resolved
9c7de4c to
253cf64
Compare
Signed-off-by: Sruti Parthiban <partsrut@amazon.com>
253cf64 to
5c56924
Compare
khushbr
previously approved these changes
Jul 2, 2021
Codecov Report
@@ Coverage Diff @@
## main #23 +/- ##
============================================
- Coverage 76.89% 76.79% -0.11%
+ Complexity 3182 3173 -9
============================================
Files 368 368
Lines 18366 18372 +6
Branches 1396 1397 +1
============================================
- Hits 14123 14109 -14
- Misses 3748 3764 +16
- Partials 495 499 +4
Continue to review full report at Codecov.
|
yojs
reviewed
Jul 6, 2021
There was a problem hiding this comment.
Let's add a test to make sure we cover all the cases.
| metrics in queue | tmp file exists | Action |
|---|---|---|
| no | no | Do nothing (Sounds fishy as this means collectors didn't run at all). |
| no | no | rename the tmp file to currrent timestamp (This also means no collectors ran since last time) |
| yes | no | write metrics file |
| yes | yes | rename the old tmp file to current and then add/append the new metrics emitted since. |
src/main/java/org/opensearch/performanceanalyzer/rca/framework/metrics/WriterMetrics.java
Outdated
Show resolved
Hide resolved
src/main/java/org/opensearch/performanceanalyzer/reader_writer_shared/EventLogFileHandler.java
Show resolved
Hide resolved
Contributor
Author
|
Added tests as a part of this PR: |
khushbr
previously approved these changes
Jul 13, 2021
Signed-off-by: Sruti Parthiban <partsrut@amazon.com>
khushbr
approved these changes
Jul 15, 2021
yojs
approved these changes
Jul 15, 2021
sruti1312
added a commit
that referenced
this pull request
Aug 25, 2021
* Adding the initial changes for purger fix * Removing deletionInterval from MetricConfig class * Moving the removeMetrics() back to PerformanceAnalyzerMetrics class * Adding Event log file deletion + deletion time metric * Updating the EventLogFilesDeleted metrics * Moving METRICS_WRITE_ERROR metric to Named Counter, updating deleteFiles() signature * nit: Removing an unused import * Addressing the spotbug failure * Fixing the linker error, updating from docs-beta to official documentation * Excluding https://www.envoyproxy.io/ from link checker. Failing with too many redirects * Create writer file only if metrics are present (#23) * Create writer file only if metrics are present Signed-off-by: Sruti Parthiban <partsrut@amazon.com> * Add metrics to writers metric * Rename writer_file_creation metric name Signed-off-by: Sruti Parthiban <partsrut@amazon.com> * Update the statistic for the metric * Spotless changes Signed-off-by: Sruti Parthiban <partsrut@amazon.com> * Add privileges for removing files (#45) Signed-off-by: Sruti Parthiban <partsrut@amazon.com> * Remove spotless dependency on main (#54) This PR removes the need for the main branch to be checked out in order to build. Signed-off-by: Marc Handalian <handalm@amazon.com> * Upgrade to version 1.0.1 Co-authored-by: Khushboo Rajput <khushbr@amazon.com> Co-authored-by: Khushboo Rajput <59671881+khushbr@users.noreply.github.com> Co-authored-by: Marc Handalian <handalm@amazon.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Sruti Parthiban partsrut@amazon.com
Is your feature request related to a problem? Please provide an existing Issue # , or describe.
opensearch-project/performance-analyzer#30
Describe the solution you are proposing
Before renaming the tmp writer file to epoch writer files, check if tmp file exists before we create the writer file.
This will help with not having empty writer file.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Check List
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.