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

Issue 11265024: Make methods in Stopwatch getters and rename to be more consistent. (Closed)

Created:
8 years, 1 month ago by floitsch
Modified:
8 years, 1 month ago
Reviewers:
Mads Ager (google)
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Make methods in Stopwatch getters and rename to be more consistent. Includes: - Stopwatch.frequency. - Stopwatch.elapsedInMs() -> Stopwatch.elapsedMilliseconds - Stopwatch.elapsedInUs() -> Stopwatch.elapsedMicroseconds - Stopwatch.elapsed() -> Stopwatch.elapsedTicks Committed: https://code.google.com/p/dart/source/detail?r=14140

Patch Set 1 #

Patch Set 2 : Apply suggestions. #

Total comments: 2

Patch Set 3 : Fix bad rename. #

Patch Set 4 : Update status files with co19 issue number. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+80 lines, -43 lines) Patch
M lib/compiler/implementation/compiler.dart View 1 3 chunks +3 lines, -3 lines 0 comments Download
M lib/compiler/implementation/tools/mini_parser.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M lib/compiler/samples/leap/leap_leg.dart View 1 3 chunks +3 lines, -3 lines 0 comments Download
M lib/core/stopwatch.dart View 1 1 chunk +6 lines, -7 lines 0 comments Download
M lib/coreimpl/stopwatch_implementation.dart View 1 1 chunk +6 lines, -6 lines 0 comments Download
M tests/benchmark_smoke/benchmark_base.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M tests/co19/co19-dart2dart.status View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M tests/co19/co19-dart2js.status View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M tests/co19/co19-runtime.status View 1 2 3 1 chunk +13 lines, -0 lines 0 comments Download
M tests/corelib/stopwatch_test.dart View 1 3 chunks +16 lines, -16 lines 0 comments Download
M tools/testing/legpad/legpad.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/css/tool.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/css/world.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/template/tool.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/template/world.dart View 1 1 chunk +1 line, -1 line 0 comments Download
M utils/tests/string_encoding/benchmark_runner.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
Sean Eagan
A Duration getter would be useful: Duration get elapsed; then you could do: stopwatch.elapsed.inMicroseconds // ...
8 years, 1 month ago (2012-10-25 16:54:22 UTC) #1
floitsch
On 2012/10/25 16:54:22, seaneagan1 wrote: > A Duration getter would be useful: > > Duration ...
8 years, 1 month ago (2012-10-25 19:06:37 UTC) #2
floitsch
Filed a bug for an "elapsed" getter to return a Duration. We can do this ...
8 years, 1 month ago (2012-10-26 13:42:34 UTC) #3
Mads Ager (google)
LGTM, with one change. https://codereview.chromium.org/11265024/diff/4001/utils/tests/string_encoding/benchmark_runner.dart File utils/tests/string_encoding/benchmark_runner.dart (right): https://codereview.chromium.org/11265024/diff/4001/utils/tests/string_encoding/benchmark_runner.dart#newcode276 utils/tests/string_encoding/benchmark_runner.dart:276: return new BlockSample(count, s.elapsedInMicroseconds * ...
8 years, 1 month ago (2012-10-26 13:57:59 UTC) #4
floitsch
8 years, 1 month ago (2012-10-26 14:17:36 UTC) #5
thanks for catching that.

https://codereview.chromium.org/11265024/diff/4001/utils/tests/string_encodin...
File utils/tests/string_encoding/benchmark_runner.dart (right):

https://codereview.chromium.org/11265024/diff/4001/utils/tests/string_encodin...
utils/tests/string_encoding/benchmark_runner.dart:276: return new
BlockSample(count, s.elapsedInMicroseconds * 1000);
On 2012/10/26 13:57:59, Mads Ager wrote:
> elapsedInMicroseconds -> elapsedMicroseconds

Done.

Powered by Google App Engine
This is Rietveld 408576698