-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Refactored MetricSearcher #103
Refactored MetricSearcher #103
Conversation
Codecov Report
@@ Coverage Diff @@
## master #103 +/- ##
============================================
- Coverage 45.98% 45.79% -0.19%
+ Complexity 557 556 -1
============================================
Files 113 114 +1
Lines 3806 3813 +7
Branches 530 531 +1
============================================
- Hits 1750 1746 -4
- Misses 1846 1856 +10
- Partials 210 211 +1
Continue to review full report at Codecov.
|
about CLA check. you can set your git commit email set in your gitHub account. use 'git log' to see your commit email. |
@@ -0,0 +1,117 @@ | |||
package com.alibaba.csp.sentinel.node.metric; |
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.
Please add Copyright and License here. Just copy the following:
/*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@@ -142,7 +134,7 @@ public MetricSearcher(String baseDir, String baseFileName, Charset charset) { | |||
fileName + MetricWriter.METRIC_FILE_INDEX_SUFFIX, offsetInIndex); |
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.
Please help me replace fileName + MetricWriter.METRIC_FILE_INDEX_SUFFIX
with MetricWriter.formIndexFileName(fileName)
Thanks for the review! both me and the commiter signed the CLA. |
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
Performed extract class operation for MetricSearcher. Extracted fields: charset, maxLinesReturn. Extracted Methods: readMetricsInOneFileByEndTime, readMetricsInOneFile, readMetricsByEndTime.