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

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

Issue 1362953002: dart2js: Measure time of individual optimization passes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add a comment Created 5 years, 3 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 | « no previous file | pkg/compiler/lib/src/common/tasks.dart » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 leg_apiimpl; 5 library leg_apiimpl;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:convert'; 8 import 'dart:convert';
9 9
10 import 'package:package_config/packages.dart'; 10 import 'package:package_config/packages.dart';
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 return setupPackages(uri).then((_) { 448 return setupPackages(uri).then((_) {
449 assert(packages != null); 449 assert(packages != null);
450 450
451 return super.run(uri).then((bool success) { 451 return super.run(uri).then((bool success) {
452 int cumulated = 0; 452 int cumulated = 0;
453 for (final task in tasks) { 453 for (final task in tasks) {
454 int elapsed = task.timing; 454 int elapsed = task.timing;
455 if (elapsed != 0) { 455 if (elapsed != 0) {
456 cumulated += elapsed; 456 cumulated += elapsed;
457 log('${task.name} took ${elapsed}msec'); 457 log('${task.name} took ${elapsed}msec');
458 for (String subtask in task.subtasks) {
459 int subtime = task.getSubtaskTime(subtask);
460 log('${task.name} > $subtask took ${subtime}msec');
461 }
458 } 462 }
459 } 463 }
460 int total = totalCompileTime.elapsedMilliseconds; 464 int total = totalCompileTime.elapsedMilliseconds;
461 log('Total compile-time ${total}msec;' 465 log('Total compile-time ${total}msec;'
462 ' unaccounted ${total - cumulated}msec'); 466 ' unaccounted ${total - cumulated}msec');
463 return success; 467 return success;
464 }); 468 });
465 }); 469 });
466 } 470 }
467 471
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 print('$message: ${tryToString(exception)}'); 530 print('$message: ${tryToString(exception)}');
527 print(tryToString(stackTrace)); 531 print(tryToString(stackTrace));
528 } 532 }
529 533
530 fromEnvironment(String name) => environment[name]; 534 fromEnvironment(String name) => environment[name];
531 535
532 LibraryInfo lookupLibraryInfo(String libraryName) { 536 LibraryInfo lookupLibraryInfo(String libraryName) {
533 return library_info.LIBRARIES[libraryName]; 537 return library_info.LIBRARIES[libraryName];
534 } 538 }
535 } 539 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/common/tasks.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698