| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |