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

Unified Diff: pkg/analysis_server/lib/src/status/get_handler.dart

Issue 2005403005: Gather and report stats on the number of times flushed results are recomputed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 | pkg/analyzer/lib/src/context/cache.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/status/get_handler.dart
diff --git a/pkg/analysis_server/lib/src/status/get_handler.dart b/pkg/analysis_server/lib/src/status/get_handler.dart
index 5b3f6de19dc0bd9f8831905f884416c4aad5736b..fccb189d2c6d08539c6e33240273b547af80679a 100644
--- a/pkg/analysis_server/lib/src/status/get_handler.dart
+++ b/pkg/analysis_server/lib/src/status/get_handler.dart
@@ -760,6 +760,20 @@ class GetHandler {
"right"
]);
buffer.write('</table>');
+
+ Map<ResultDescriptor, int> recomputedCounts =
+ CacheEntry.recomputedCounts;
+ List<ResultDescriptor> descriptors = recomputedCounts.keys.toList();
+ descriptors.sort(ResultDescriptor.SORT_BY_NAME);
+ buffer.write('<p><b>Results computed after being flushed</b></p>');
+ buffer.write(
+ '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
+ _writeRow(buffer, ['Result', 'Count'], header: true);
+ for (ResultDescriptor descriptor in descriptors) {
+ _writeRow(buffer, [descriptor.name, recomputedCounts[descriptor]],
+ classes: [null, "right"]);
+ }
+ buffer.write('</table>');
}, (StringBuffer buffer) {
//
// Write task model timing information.
@@ -986,8 +1000,7 @@ class GetHandler {
SOURCE_QUERY_PARAM: sourceUri
};
List<ResultDescriptor> results = _getExpectedResults(entry);
- results.sort((ResultDescriptor first, ResultDescriptor second) =>
- first.toString().compareTo(second.toString()));
+ results.sort(ResultDescriptor.SORT_BY_NAME);
buffer.write('<h3>');
buffer.write(HTML_ESCAPE.convert(entry.target.toString()));
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/cache.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698