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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2917183003: update the analyzer and analysis server perf tags (Closed)
Patch Set: Created 3 years, 6 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/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 93ac117499661dc09c6ef711b5b69d8b3a9dbe08..f312de28954d61c0d3d731ec02b43d26c20e60d7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -385,9 +385,14 @@ class FileState {
if (USE_FASTA_PARSER) {
try {
- fasta.ScannerResult scanResult = fasta.scan(_contentBytes,
+ fasta.ScannerResult scanResult =
+ PerformanceStatistics.scan.makeCurrentWhile(() {
+ return fasta.scan(
+ _contentBytes,
includeComments: true,
- scanGenericMethodComments: analysisOptions.strongMode);
+ scanGenericMethodComments: analysisOptions.strongMode,
+ );
+ });
var astBuilder = new fasta.AstBuilder(
new ErrorReporter(errorListener, source),
@@ -407,6 +412,7 @@ class FileState {
unit.lineInfo = lineInfo;
return unit;
} catch (e, st) {
+ // TODO(devoncarew): We likely shouldn't be doing raw prints here.
Brian Wilkerson 2017/06/03 23:16:37 You're right. We should minimally use the instrume
scheglov 2017/06/04 00:30:44 This branch does not work yet for anyone but us, a
devoncarew 2017/06/04 01:45:52 Removed the TODO: - I expect this will get cleaned
print(e);
print(st);
rethrow;
@@ -415,7 +421,9 @@ class FileState {
CharSequenceReader reader = new CharSequenceReader(content);
Scanner scanner = new Scanner(source, reader, errorListener);
scanner.scanGenericMethodComments = analysisOptions.strongMode;
- Token token = scanner.tokenize();
+ Token token = PerformanceStatistics.scan.makeCurrentWhile(() {
+ return scanner.tokenize();
+ });
LineInfo lineInfo = new LineInfo(scanner.lineStarts);
Parser parser = new Parser(source, errorListener);

Powered by Google App Engine
This is Rietveld 408576698