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

Issue 227113010: Truncate excessively long output from tests in test.dart. (Closed)

Created:
6 years, 8 months ago by Bill Hesse
Modified:
6 years, 8 months ago
CC:
reviews_dartlang.org, ricow1
Visibility:
Public.

Description

Truncate excessively long output from tests in test.dart. BUG=dartbug.com/18084 R=kustermann@google.com Committed: https://code.google.com/p/dart/source/detail?r=34867

Patch Set 1 #

Total comments: 4

Patch Set 2 : Address comments #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+82 lines, -18 lines) Patch
M tools/testing/dart/test_runner.dart View 1 10 chunks +82 lines, -18 lines 2 comments Download

Messages

Total messages: 7 (0 generated)
Bill Hesse
6 years, 8 months ago (2014-04-08 14:01:03 UTC) #1
Bill Hesse
6 years, 8 months ago (2014-04-08 14:50:27 UTC) #2
kustermann
lgtm with comments https://codereview.chromium.org/227113010/diff/1/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/227113010/diff/1/tools/testing/dart/test_runner.dart#newcode1674 tools/testing/dart/test_runner.dart:1674: static const int TAIL_LENGTH = 20000; ...
6 years, 8 months ago (2014-04-08 15:23:47 UTC) #3
Bill Hesse
Committed patchset #1 manually as r34867 (presubmit successful).
6 years, 8 months ago (2014-04-09 10:38:34 UTC) #4
Bill Hesse
https://codereview.chromium.org/227113010/diff/1/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/227113010/diff/1/tools/testing/dart/test_runner.dart#newcode1674 tools/testing/dart/test_runner.dart:1674: static const int TAIL_LENGTH = 20000; On 2014/04/08 15:23:47, ...
6 years, 8 months ago (2014-04-09 10:40:27 UTC) #5
Ivan Posva
-Ivan https://codereview.chromium.org/227113010/diff/10001/tools/testing/dart/test_runner.dart File tools/testing/dart/test_runner.dart (right): https://codereview.chromium.org/227113010/diff/10001/tools/testing/dart/test_runner.dart#newcode1700 tools/testing/dart/test_runner.dart:1700: head.length = MAX_HEAD; This is making matters actually ...
6 years, 8 months ago (2014-04-10 00:10:44 UTC) #6
Bill Hesse
6 years, 8 months ago (2014-04-11 07:39:48 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/227113010/diff/10001/tools/testing/dart/test_...
File tools/testing/dart/test_runner.dart (right):

https://codereview.chromium.org/227113010/diff/10001/tools/testing/dart/test_...
tools/testing/dart/test_runner.dart:1700: head.length = MAX_HEAD;
On 2014/04/10 00:10:44, Ivan Posva wrote:
> This is making matters actually worse, ending up using more memory. Now you
> have:
> - A tail list containing everything after the cutoff, which is the result of
the
> sublist call.
> - A head list of the original capacity, but the length having been reset with
> the call to length. Also you did have to go through the whole overhang and set
> all elements to null.

These variables are only live while the test is running.  As soon as the test
completes, both head and tail are dropped, and can be GCd, because toList has
been called.

Tail is also truncated on an ongoing basis.  I don't see any major improvements
that could be made - using head = head.sublist would not be better than
head.length, unless head was much longer than MAX_HEAD.


According to tests, this does reduce memory use by about 25%, or 40 MB.  It may
not save 25% when running 10 configurations though.

Powered by Google App Engine
This is Rietveld 408576698