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

Side by Side Diff: pkg/compiler/lib/src/dump_info.dart

Issue 1454373002: Use Zone to correctly measure async operations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@_temporary_fletch_patches
Patch Set: Address Florian's comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dump_info; 5 library dump_info;
6 6
7 import 'dart:convert' 7 import 'dart:convert'
8 show HtmlEscape, JsonEncoder, StringConversionSink, ChunkedConversionSink; 8 show HtmlEscape, JsonEncoder, StringConversionSink, ChunkedConversionSink;
9 9
10 import 'package:dart2js_info/info.dart'; 10 import 'package:dart2js_info/info.dart';
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 .toList(); 558 .toList();
559 } 559 }
560 560
561 result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap(); 561 result.deferredFiles = compiler.deferredLoadTask.computeDeferredMap();
562 stopwatch.stop(); 562 stopwatch.stop();
563 result.program = new ProgramInfo( 563 result.program = new ProgramInfo(
564 entrypoint: infoCollector._elementToInfo[compiler.mainFunction], 564 entrypoint: infoCollector._elementToInfo[compiler.mainFunction],
565 size: _programSize, 565 size: _programSize,
566 dart2jsVersion: compiler.hasBuildId ? compiler.buildId : null, 566 dart2jsVersion: compiler.hasBuildId ? compiler.buildId : null,
567 compilationMoment: new DateTime.now(), 567 compilationMoment: new DateTime.now(),
568 compilationDuration: compiler.totalCompileTime.elapsed, 568 compilationDuration: compiler.measurer.wallClock.elapsed,
569 toJsonDuration: stopwatch.elapsedMilliseconds, 569 toJsonDuration: stopwatch.elapsedMilliseconds,
570 dumpInfoDuration: this.timing, 570 dumpInfoDuration: this.timing,
571 noSuchMethodEnabled: compiler.backend.enabledNoSuchMethod, 571 noSuchMethodEnabled: compiler.backend.enabledNoSuchMethod,
572 minified: compiler.enableMinification); 572 minified: compiler.enableMinification);
573 573
574 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion( 574 ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
575 new StringConversionSink.fromStringSink(buffer)); 575 new StringConversionSink.fromStringSink(buffer));
576 sink.add(new AllInfoJsonCodec().encode(result)); 576 sink.add(new AllInfoJsonCodec().encode(result));
577 reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, { 577 reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
578 'text': "View the dumped .info.json file at " 578 'text': "View the dumped .info.json file at "
579 "https://dart-lang.github.io/dump-info-visualizer" 579 "https://dart-lang.github.io/dump-info-visualizer"
580 }); 580 });
581 } 581 }
582 } 582 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698