-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Fix/list metric files #331
Conversation
Signed-off-by: Carpenter Lee <[email protected]>
Signed-off-by: Carpenter Lee <[email protected]>
Signed-off-by: Carpenter Lee <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #331 +/- ##
============================================
+ Coverage 38.33% 38.42% +0.08%
- Complexity 934 937 +3
============================================
Files 218 218
Lines 6925 6935 +10
Branches 941 942 +1
============================================
+ Hits 2655 2665 +10
- Misses 3932 3933 +1
+ Partials 338 337 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Fix #330 : fix listMetricFiles() returns wrong file name list. Signed-off-by: Carpenter Lee <[email protected]> * Add timestamp check when read metrics. Signed-off-by: Carpenter Lee <[email protected]> * Refine test case Signed-off-by: Carpenter Lee <[email protected]>
* Fix alibaba#330 : fix listMetricFiles() returns wrong file name list. Signed-off-by: Carpenter Lee <[email protected]> * Add timestamp check when read metrics. Signed-off-by: Carpenter Lee <[email protected]> * Refine test case Signed-off-by: Carpenter Lee <[email protected]>
Describe what this PR does / why we need it
MetricWriter#listMetricFiles()
method is used for listing all metric files of the specific app. It usesString.contains()
to search the metric file name instead of whole matching, this will lead wrong file reading when appName contains some other one, for example one appName is simple-Sentinel-SDK-Demo, the other is Sentinel-SDK-Demo, the former app's metric file will appearing in the latter metric files list.MetricWriter#listMetricFiles()
should return right metric files name list.Does this pull request fix one issue?
Fixes #330
Describe how you did it
Use whole string matching instead of
String.contains()
to filter app metric file name.Describe how to verify it
Run test cases.
Special notes for reviews