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