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

Unified Diff: pkg/analyzer/lib/src/generated/source_io.dart

Issue 179123010: Add timing info for file IO into Dart based analyzer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
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 64289d59245c6465c3eba746a1303161e3e27891..b74d89b3fb2065065889ee39553b1f6f0785a6b2 100644
--- a/pkg/analyzer/lib/src/generated/source_io.dart
+++ b/pkg/analyzer/lib/src/generated/source_io.dart
@@ -10,7 +10,8 @@ library engine.source.io;
import 'source.dart';
import 'java_core.dart';
import 'java_io.dart';
-import 'engine.dart' show AnalysisContext, AnalysisEngine, TimestampedData;
+import 'engine.dart';
+import 'utilities_general.dart';
export 'source.dart';
/**
@@ -101,10 +102,22 @@ class FileBasedSource implements Source {
bool exists() => _file.isFile();
- TimestampedData<String> get contents => contentsFromFile;
+ TimestampedData<String> get contents {
+ TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
+ try {
+ return contentsFromFile;
+ } finally {
+ handle.stop();
+ }
+ }
void getContentsToReceiver(Source_ContentReceiver receiver) {
- getContentsFromFileToReceiver(receiver);
+ TimeCounter_TimeCounterHandle handle = PerformanceStatistics.io.start();
+ try {
+ getContentsFromFileToReceiver(receiver);
+ } finally {
+ handle.stop();
+ }
}
String get encoding {

Powered by Google App Engine
This is Rietveld 408576698