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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.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/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/utilities_general.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/source_io.dart
diff --git a/pkg/analyzer/lib/src/generated/source_io.dart b/pkg/analyzer/lib/src/generated/source_io.dart
index e0078d5987992681545ecc8d455f9352ff002b18..afc50ff5491a76c002cdb437a4ecc5130e40ac14 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -129,11 +129,11 @@ class FileBasedSource extends Source {
@override
TimestampedData<String> get contents {
- TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
+ PerformanceTag prevTag = PerformanceStatistics.io.makeCurrent();
try {
return contentsFromFile;
} finally {
- _reportIfSlowIO(handle.stop());
+ prevTag.makeCurrent();
}
}
@@ -235,23 +235,6 @@ class FileBasedSource extends Source {
}
return file.getAbsolutePath();
}
-
- /**
- * Record the time the IO took if it was slow
- */
- void _reportIfSlowIO(int nanos) {
- // TODO(brianwilkerson) Decide whether we still want to capture this data.
-// //If slower than 10ms
-// if (nanos > 10 * TimeCounter.NANOS_PER_MILLI) {
-// InstrumentationBuilder builder = Instrumentation.builder2("SlowIO");
-// try {
-// builder.data3("fileName", fullName);
-// builder.metric2("IO-Time-Nanos", nanos);
-// } finally {
-// builder.log();
-// }
-// }
- }
}
/**
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | pkg/analyzer/lib/src/generated/utilities_general.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698