[Webkit-unassigned] [Bug 189135] BenchmarkResults.format should support specifying depth of tests to show.
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Sep 6 13:44:57 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=189135
--- Comment #3 from dewei_zhu at apple.com ---
Comment on attachment 348999
--> https://bugs.webkit.org/attachment.cgi?id=348999
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"
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180906/92bf7258/attachment.html>
More information about the webkit-unassigned
mailing list