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

Unified Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 918383002: Rework analysis server performance measurement code. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer/lib/src/analyzer_impl.dart b/pkg/analyzer/lib/src/analyzer_impl.dart
index df17a70d2e365f8ed66e78b08fe2fce8ed1f7804..bef2e16a468c952601323a94c0c1925f99915c3d 100644
--- a/pkg/analyzer/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer/lib/src/analyzer_impl.dart
@@ -25,6 +25,7 @@ import 'generated/error.dart';
import 'generated/java_io.dart';
import 'generated/sdk_io.dart';
import 'generated/source_io.dart';
+import 'package:analyzer/src/generated/utilities_general.dart';
DirectoryBasedDartSdk sdk;
@@ -299,20 +300,15 @@ class AnalyzerImpl {
_printColdPerf() {
// print cold VM performance numbers
int totalTime = JavaSystem.currentTimeMillis() - startTime;
- int ioTime = PerformanceStatistics.io.result;
- int scanTime = PerformanceStatistics.scan.result;
- int parseTime = PerformanceStatistics.parse.result;
- int resolveTime = PerformanceStatistics.resolve.result;
- int errorsTime = PerformanceStatistics.errors.result;
- int hintsTime = PerformanceStatistics.hints.result;
- stdout.writeln("io-cold:$ioTime");
- stdout.writeln("scan-cold:$scanTime");
- stdout.writeln("parse-cold:$parseTime");
- stdout.writeln("resolve-cold:$resolveTime");
- stdout.writeln("errors-cold:$errorsTime");
- stdout.writeln("hints-cold:$hintsTime");
- stdout.writeln("other-cold:${totalTime
- - (ioTime + scanTime + parseTime + resolveTime + errorsTime + hintsTime)}");
+ int otherTime = totalTime;
+ for (PerformanceTag tag in PerformanceTag.all) {
+ if (tag != PerformanceTag.UNKNOWN) {
+ int tagTime = tag.elapsedMs;
+ stdout.writeln('${tag.label}-cold:$tagTime');
+ otherTime -= tagTime;
+ }
+ }
+ stdout.writeln('other-cold:$otherTime');
stdout.writeln("total-cold:$totalTime");
}
@@ -333,20 +329,15 @@ class AnalyzerImpl {
// print performance numbers
if (options.perf || options.warmPerf) {
int totalTime = JavaSystem.currentTimeMillis() - startTime;
- int ioTime = PerformanceStatistics.io.result;
- int scanTime = PerformanceStatistics.scan.result;
- int parseTime = PerformanceStatistics.parse.result;
- int resolveTime = PerformanceStatistics.resolve.result;
- int errorsTime = PerformanceStatistics.errors.result;
- int hintsTime = PerformanceStatistics.hints.result;
- stdout.writeln("io:$ioTime");
- stdout.writeln("scan:$scanTime");
- stdout.writeln("parse:$parseTime");
- stdout.writeln("resolve:$resolveTime");
- stdout.writeln("errors:$errorsTime");
- stdout.writeln("hints:$hintsTime");
- stdout.writeln("other:${totalTime
- - (ioTime + scanTime + parseTime + resolveTime + errorsTime + hintsTime)}");
+ int otherTime = totalTime;
+ for (PerformanceTag tag in PerformanceTag.all) {
+ if (tag != PerformanceTag.UNKNOWN) {
+ int tagTime = tag.elapsedMs;
+ stdout.writeln('${tag.label}:$tagTime');
+ otherTime -= tagTime;
+ }
+ }
+ stdout.writeln('other:$otherTime');
stdout.writeln("total:$totalTime");
}
}
« no previous file with comments | « pkg/analyzer/bin/analyzer.dart ('k') | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698