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

Unified Diff: bin/library_size_split.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: 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
Index: bin/library_size_split.dart
diff --git a/bin/library_size_split.dart b/bin/library_size_split.dart
index 8dd419aa8bd665014bee82ea538a0d4b682f14ae..9221bf49f7b7c11de599aa90bca8b2d4ecd1d94b 100644
--- a/bin/library_size_split.dart
+++ b/bin/library_size_split.dart
@@ -59,23 +59,21 @@
/// This example is very similar to [defaultGrouping].
library dart2js_info.bin.library_size_split;
-import 'dart:convert';
import 'dart:io';
import 'dart:math' show max;
import 'package:dart2js_info/info.dart';
+import 'package:dart2js_info/src/util.dart';
import 'package:yaml/yaml.dart';
-main(args) {
+main(args) async {
if (args.length < 1) {
print('usage: dart tool/library_size_split.dart '
'path-to-info.json [grouping.yaml]');
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 groupingText =
args.length > 1 ? new File(args[1]).readAsStringSync() : defaultGrouping;

Powered by Google App Engine
This is Rietveld 408576698