WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
189135
BenchmarkResults.format should support specifying depth of tests to show.
https://bugs.webkit.org/show_bug.cgi?id=189135
Summary
BenchmarkResults.format should support specifying depth of tests to show.
dewei_zhu
Reported
2018-08-29 17:49:32 PDT
BenchmarkResults.format should support specifying depth of tests to show.
Attachments
Patch
(4.62 KB, patch)
2018-09-05 20:43 PDT
,
dewei_zhu
no flags
Details
Formatted Diff
Diff
Patch
(3.99 KB, patch)
2018-09-06 14:59 PDT
,
dewei_zhu
rniwa
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
dewei_zhu
Comment 1
2018-09-05 20:43:31 PDT
Created
attachment 348999
[details]
Patch
Ryosuke Niwa
Comment 2
2018-09-06 00:31:34 PDT
Comment on
attachment 348999
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=348999&action=review
r=me with the suggested change.
> Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py:78 > - output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, indent=(indent + ' ' * len(test_name))) > + output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, None if max_depth is None else max_depth - 1, indent=(indent + ' ' * len(test_name)))
This is such a convoluted way of doing this. Please just check: "if 'tests' in test and max_depth > 1" above.
dewei_zhu
Comment 3
2018-09-06 13:44:57 PDT
Comment on
attachment 348999
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=348999&action=review
>> Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py:78 >> + output += cls._format_tests(test['tests'], scale_unit, show_iteration_values, None if max_depth is None else max_depth - 1, indent=(indent + ' ' * len(test_name))) > > This is such a convoluted way of doing this. > Please just check: "if 'tests' in test and max_depth > 1" above.
I don't think this will handle the case when max_depth is None. It would have been much easier if Python have something similar to Infinity in JavaScript. Also, due to the check on line 56, it ensures max_depth can either be None or integer larger than 0. I can try to simplify it by using "max_depth - 1 if max_depth else None"
Ryosuke Niwa
Comment 4
2018-09-06 14:13:45 PDT
Comment on
attachment 348999
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=348999&action=review
> Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py:52 > + def format(self, scale_unit=True, show_iteration_values=False, max_depth=None): > + return self._format_tests(self._results, scale_unit, show_iteration_values, max_depth)
Just use max_depth=sys.maxsize here.
dewei_zhu
Comment 5
2018-09-06 14:59:32 PDT
Created
attachment 349078
[details]
Patch
dewei_zhu
Comment 6
2018-09-06 15:33:05 PDT
Re-landed the change in
r235762
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug