WebKit Bugzilla
Attachment 348999 Details for
Bug 189135
: BenchmarkResults.format should support specifying depth of tests to show.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189135-20180905204331.patch (text/plain), 4.62 KB, created by
dewei_zhu
on 2018-09-05 20:43:31 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
dewei_zhu
Created:
2018-09-05 20:43:31 PDT
Size:
4.62 KB
patch
obsolete
>Subversion Revision: 235490 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 3ad6772a8a07b5ea6819e7bb50bf6e7ba66efd99..2910f6c55e8380b1276a59c3a8bc459238b2cdaa 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,17 @@ >+2018-08-29 Dewei Zhu <dewei_zhu@apple.com> >+ >+ BenchmarkResults.format should support specifying depth of tests to show. >+ https://bugs.webkit.org/show_bug.cgi?id=189135 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Added the option to specify the depth of tests to show. >+ >+ * Scripts/webkitpy/benchmark_runner/benchmark_results.py: >+ (BenchmarkResults): >+ (BenchmarkResults.format): Added 'max_depth' option. >+ (BenchmarkResults._format_tests): Added unit test for 'max_depth'. >+ > 2018-08-29 Jer Noble <jer.noble@apple.com> > > Unreviewed test gardening; NowPlayingTest API tests require High Sierra. >diff --git a/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py b/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py >index d02dc1a16679810046ecdfa836faa25a218f4ff7..f307c3a91e71d3329380f449875d204d61d2f893 100644 >--- a/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py >+++ b/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results.py >@@ -48,11 +48,13 @@ class BenchmarkResults(object): > self._lint_results(results) > self._results = self._aggregate_results(results) > >- def format(self, scale_unit=True, show_iteration_values=False): >- return self._format_tests(self._results, scale_unit, show_iteration_values) >+ 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) > > @classmethod >- def _format_tests(cls, tests, scale_unit, show_iteration_values, indent=''): >+ def _format_tests(cls, tests, scale_unit, show_iteration_values, max_depth, indent=''): >+ if max_depth is not None and max_depth <= 0: >+ return '' > output = '' > config_name = 'current' > for test_name in sorted(tests.keys()): >@@ -73,7 +75,7 @@ class BenchmarkResults(object): > output += aggregator_name + ':' > output += ' ' + cls._format_values(metric_name, metric[aggregator_name][config_name], scale_unit, show_iteration_values) + '\n' > if 'tests' in test: >- 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))) > return output > > @classmethod >diff --git a/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py b/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py >index d4be43c82e373657565c10ca007c3ef23eb11e2e..f87f12ed2e0ca58bde8f51728f48abeea003ed7b 100644 >--- a/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py >+++ b/Tools/Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py >@@ -55,6 +55,19 @@ SomeTest:Time:Arithmetic: 3.0ms stdev=33.3% > SubTest2:Time: 5.0ms stdev=20.0% > '''[1:]) > >+ def test_format_with_depth_limit(self): >+ result = BenchmarkResults({'SomeTest': { >+ 'metrics': {'Time': ['Total', 'Arithmetic']}, >+ 'tests': { >+ 'SubTest1': {'metrics': {'Time': {'current': [1, 2, 3]}}}, >+ 'SubTest2': {'metrics': {'Time': {'current': [4, 5, 6]}}}}}}) >+ self.assertEqual(result.format(max_depth=1), ''' >+SomeTest:Time:Arithmetic: 3.0ms stdev=33.3% >+ :Time:Total: 7.0ms stdev=28.6% >+'''[1:]) >+ >+ >+ > def test_format_values_with_large_error(self): > self.assertEqual(BenchmarkResults._format_values('Runs', [1, 2, 3]), '2.0/s stdev=50.0%') > self.assertEqual(BenchmarkResults._format_values('Runs', [10, 20, 30]), '20/s stdev=50.0%') >diff --git a/Websites/perf.webkit.org/public/v3/models/test-group.js b/Websites/perf.webkit.org/public/v3/models/test-group.js >index 4ac43b42978bcacee3397904eeb6f77d7feb9d4f..91a4007fdd9211a3827fadb2c2bb495fc321c2ab 100644 >--- a/Websites/perf.webkit.org/public/v3/models/test-group.js >+++ b/Websites/perf.webkit.org/public/v3/models/test-group.js >@@ -194,7 +194,7 @@ class TestGroup extends LabeledObject { > { > var self = this; > var id = this.id(); >- return PrivilegedAPI.sendRequest('update-test-group', { >+ return PrivilegedAPI.sendRequest('updatePatisserie-test-group', { > group: id, > name: newName, > }).then(function (data) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189135
:
348999
|
349078