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

Unified Diff: dart/site/try/poi/poi.dart

Issue 625913002: More timing in poi.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r40920. Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/site/try/poi/poi.dart
diff --git a/dart/site/try/poi/poi.dart b/dart/site/try/poi/poi.dart
index 7eb6744575e8cb76dad1afcbd18ec994fc9ca394..478d9b1b23eb6c37d63bdd5ed60ff9f8212a2fe8 100644
--- a/dart/site/try/poi/poi.dart
+++ b/dart/site/try/poi/poi.dart
@@ -358,6 +358,7 @@ Future<Element> runPoi(
int position,
api.CompilerInputProvider inputProvider,
api.DiagnosticHandler handler) {
+ Stopwatch sw = new Stopwatch()..start();
Uri libraryRoot = Uri.base.resolve('sdk/');
Uri packageRoot = Uri.base.resolveUri(
new Uri.file('${io.Platform.packageRoot}/'));
@@ -390,24 +391,32 @@ Future<Element> runPoi(
reuseLibrary: reuseLibrary).then((Compiler newCompiler) {
var filter = new ScriptOnlyFilter(script);
newCompiler.enqueuerFilter = filter;
- return runPoiInternal(newCompiler, updater, position);
+ return runPoiInternal(newCompiler, sw, updater, position);
});
}
Future<Element> runPoiInternal(
Compiler newCompiler,
+ Stopwatch sw,
LibraryUpdater updater,
int position) {
-
+ bool isFullCompile = cachedCompiler != newCompiler;
cachedCompiler = newCompiler;
if (poiTask == null || poiTask.compiler != cachedCompiler) {
poiTask = new PoiTask(cachedCompiler);
cachedCompiler.tasks.add(poiTask);
}
+ if (!isFullCompile) {
+ printFormattedTime(
+ 'Analyzing changes and updating elements took', sw.elapsedMicroseconds);
+ }
+ sw.reset();
+
Future<bool> compilation = cachedCompiler.run(updater.uri);
return compilation.then((success) {
+ printVerbose('Compiler queue processed in ${sw.elapsedMicroseconds}us');
if (isVerbose) {
for (final task in cachedCompiler.tasks) {
int time = task.timingMicroseconds;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698