Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Issue 2933973002: Simplify Command classes. (Closed)

Created:
3 years, 6 months ago by Bob Nystrom
Modified:
3 years, 6 months ago
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Simplify Command classes. - Get rid of separate CommandBuilder class and singleton pattern. It was being passed around explicitly even though half of the places that received a CommandBuilder as a parameter still directly called CommandBuilder.instance instead of using it. - Get rid of Command caching. As far as I can tell, it makes no measurable difference in runtime performance or memory usage. Even with a large invocation of a lot of configurations and tests, the Command classes don't seem to be a significant use of memory. - Shorten the factory names. "get" adds no value, and we know it returns a "Command" since it's on Command. R=whesse@google.com Committed: https://github.com/dart-lang/sdk/commit/a6ca718e987608a2e3dde5c3540f6a97aba2cc48

Patch Set 1 #

Patch Set 2 : Move Command and CommandOutput classes to separate files. #

Total comments: 6

Patch Set 3 : Merge branch 'master' into command-refactor #

Patch Set 4 : Rename class. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1605 lines, -1744 lines) Patch
A tools/testing/dart/command.dart View 1 1 chunk +609 lines, -0 lines 0 comments Download
A tools/testing/dart/command_output.dart View 1 2 3 1 chunk +910 lines, -0 lines 0 comments Download
M tools/testing/dart/compiler_configuration.dart View 1 16 chunks +52 lines, -112 lines 0 comments Download
M tools/testing/dart/runtime_configuration.dart View 1 15 chunks +12 lines, -26 lines 0 comments Download
M tools/testing/dart/test_progress.dart View 1 1 chunk +2 lines, -0 lines 0 comments Download
M tools/testing/dart/test_runner.dart View 1 2 3 7 chunks +5 lines, -1574 lines 0 comments Download
M tools/testing/dart/test_suite.dart View 1 9 chunks +15 lines, -32 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
Bob Nystrom
I split this into two patch sets for ease of review. The first contains the ...
3 years, 6 months ago (2017-06-12 22:41:29 UTC) #2
Bill Hesse
On 2017/06/12 22:41:29, Bob Nystrom wrote: > I split this into two patch sets for ...
3 years, 6 months ago (2017-06-13 18:15:53 UTC) #3
Bob Nystrom
On 2017/06/13 18:15:53, Bill Hesse wrote: > On 2017/06/12 22:41:29, Bob Nystrom wrote: > > ...
3 years, 6 months ago (2017-06-14 00:03:54 UTC) #6
Bill Hesse
On 2017/06/14 00:03:54, Bob Nystrom wrote: > On 2017/06/13 18:15:53, Bill Hesse wrote: > > ...
3 years, 6 months ago (2017-06-14 15:44:44 UTC) #7
Bob Nystrom
On 2017/06/14 15:44:44, Bill Hesse wrote: > On 2017/06/14 00:03:54, Bob Nystrom wrote: > > ...
3 years, 6 months ago (2017-06-14 18:03:51 UTC) #8
Bill Hesse
lgtm https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/command_output.dart File tools/testing/dart/command_output.dart (right): https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/command_output.dart#newcode151 tools/testing/dart/command_output.dart:151: class BrowserCommandOutputImpl extends CommandOutputImpl { I just renamed ...
3 years, 6 months ago (2017-06-15 12:08:40 UTC) #9
Bob Nystrom
Committed patchset #4 (id:60001) manually as a6ca718e987608a2e3dde5c3540f6a97aba2cc48 (presubmit successful).
3 years, 6 months ago (2017-06-15 21:19:08 UTC) #11
Bob Nystrom
3 years, 6 months ago (2017-06-15 21:19:29 UTC) #12
Message was sent while issue was closed.
Thanks!

https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/comm...
File tools/testing/dart/command_output.dart (right):

https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/comm...
tools/testing/dart/command_output.dart:151: class BrowserCommandOutputImpl
extends CommandOutputImpl {
On 2017/06/15 12:08:40, Bill Hesse wrote:
> I just renamed BrowserCommandOutputImpl to ContentShellCommandOutputImpl in a
> different CL that landed.

Yup, I saw that when I merged. Renamed it here too.

https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/comm...
tools/testing/dart/command_output.dart:307: class HTMLBrowserCommandOutputImpl
extends BrowserCommandOutputImpl {
On 2017/06/15 12:08:40, Bill Hesse wrote:
> I think this class may not be used any more.  Can you find a configuration
that
> will reach this?  Issue filed https://github.com/dart-lang/sdk/issues/29869

It doesn't seem to be used, but the corresponding BrowserTestCommand does get
constructed. It just doesn't seem to make it's way to createCommandOutput() as
far as I can tell. But I'm not super confident about that, so I'll leave it
alone for now.

https://codereview.chromium.org/2933973002/diff/20001/tools/testing/dart/comm...
tools/testing/dart/command_output.dart:453: class BrowserControllerTestOutcome
extends CommandOutputImpl
On 2017/06/15 12:08:40, Bill Hesse wrote:
> This really should be named like the others, as
> BrowserControllerCommandOutputImpl (or even BrowserCommandOutputImpl, since
that
> name is freed by my rename of the existing class).

Done.

Powered by Google App Engine
This is Rietveld 408576698