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

Unified Diff: bin/debug_info.dart

Issue 2201903004: add tool to get breakdown of deferred libraries by size (Closed) Base URL: git@github.com:dart-lang/dart2js_info.git@master
Patch Set: add TODO Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bin/coverage_log_server.dart ('k') | bin/deferred_library_check.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/debug_info.dart
diff --git a/bin/debug_info.dart b/bin/debug_info.dart
index f0dd47bb98796c90ab04dd3674fbc1ab666824af..3c091141e003f24f0f455032ea6815ed9497f88f 100644
--- a/bin/debug_info.dart
+++ b/bin/debug_info.dart
@@ -6,23 +6,20 @@
/// that it is consistent and that it covers all the data we expect it to cover.
library dart2js_info.bin.debug_info;
-import 'dart:convert';
import 'dart:io';
import 'package:dart2js_info/info.dart';
import 'package:dart2js_info/src/graph.dart';
import 'package:dart2js_info/src/util.dart';
-main(args) {
+main(args) async {
if (args.length < 1) {
print('usage: dart tool/debug_info.dart path-to-info.json '
'[--show-library libname]');
exit(1);
}
- var filename = args[0];
- var json = JSON.decode(new File(filename).readAsStringSync());
- var info = new AllInfoJsonCodec().decode(json);
+ var info = await infoFromFile(args.first);
var debugLibName;
if (args.length > 2 && args[1] == '--show-library') {
« no previous file with comments | « bin/coverage_log_server.dart ('k') | bin/deferred_library_check.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698