EMC vnx block adds collect performance interface#906
EMC vnx block adds collect performance interface#906joseph-v merged 26 commits intosodafoundation:masterfrom
Conversation
EMC vnx block adds collect performance interface
Codecov Report
@@ Coverage Diff @@
## master #906 +/- ##
==========================================
- Coverage 71.47% 71.12% -0.35%
==========================================
Files 182 182
Lines 21532 21889 +357
Branches 3291 3346 +55
==========================================
+ Hits 15389 15568 +179
- Misses 5103 5268 +165
- Partials 1040 1053 +13
|
Add collect performance interface
There was a problem hiding this comment.
It is recommended to use this way: ' '.join(disk_name.strip().split()) .
There was a problem hiding this comment.
This if statement is redundant.
|
|
||
| def collect_perf_metrics(self, storage_id, resource_metrics, | ||
| start_time, end_time): | ||
| metrics = [] |
There was a problem hiding this comment.
It is recommended to add log info when starting this function, and record storage_id, start_time, and end_time in log info.
There was a problem hiding this comment.
It's already judged outside of this function, so it's redundant here.
There was a problem hiding this comment.
It's already judged outside of this function, or [] is redundant here.
There was a problem hiding this comment.
Why do we need StringIO ? It's recommended to use simple statement csv.reader(file) .
There was a problem hiding this comment.
These two if statements can be simplified as if not consts.METRIC_MAP.get(resources_type, {}).get(metric_name): continue .
There was a problem hiding this comment.
It's recommended to use == , not in .
There was a problem hiding this comment.
Please use copy.copy() , not copy.deepcopy().
| return metrics | ||
| metrics = self.create_metrics(storage_id, resource_metrics, | ||
| resources_map, resources_type_map, | ||
| performance_lines_map) |
There was a problem hiding this comment.
Please add log info to record storage_id, start_time, end_time, and the length of metrics when collect successfully.
There was a problem hiding this comment.
Please replace Chinese symbols with English symbols.
Emc vnx block 20220529
Emc vnx block 20220529
What this PR does / why we need it:
1 adds collect performance interface
Which issue this PR fixes (optional, in fixes #(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #
Special notes for your reviewer:
Release note: