-
Notifications
You must be signed in to change notification settings - Fork 86
Bug Fix - Fix NVBandwidth benchmark results parsing bug (#748) #782
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -190,10 +190,17 @@ def _process_raw_line(self, line, parse_status): | |
|
|
||
| # Parse summary results | ||
| if self.re_summary_pattern.match(line): | ||
| value = self.re_summary_pattern.match(line).group(2) | ||
| test_name = parse_status['test_name'] | ||
| match = self.re_summary_pattern.match(line) | ||
| value = match.group(2) | ||
| # Use test_name from parse_status, fallback to group(1) from SUM line | ||
| test_name = parse_status['test_name'] or match.group(1).lower() | ||
| benchmark_type = parse_status['benchmark_type'] | ||
| parse_status['results'][f'{test_name}_sum_{benchmark_type}'] = float(value) | ||
| # Infer benchmark_type from test_name if not set (e.g., after waived tests) | ||
| if benchmark_type is None: | ||
| benchmark_type = 'lat' if 'latency' in test_name else 'bw' | ||
| # Only add result when we have valid metric name (avoid _sum_None or sum_None) | ||
| if test_name and benchmark_type: | ||
| parse_status['results'][f'{test_name}_sum_{benchmark_type}'] = float(value) | ||
|
Comment on lines
+195
to
+203
|
||
|
|
||
| # Reset parsing state for next test | ||
| parse_status['test_name'] = '' | ||
|
|
||
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.
re_summary_pattern.match(line)is evaluated twice (once in theifand again to assignmatch). Consider assigning once (e.g.,match = ...; if match:) to avoid duplicated work and keep the control flow simpler.