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

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

Issue 916973002: More complete state transition data (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 | « no previous file | 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/analysis_server/lib/src/get_handler.dart
diff --git a/pkg/analysis_server/lib/src/get_handler.dart b/pkg/analysis_server/lib/src/get_handler.dart
index 65afea2df84765edc72e3547b37487fb4ec311d6..2dadde0826c5a67764faca740712d855160c1b19 100644
--- a/pkg/analysis_server/lib/src/get_handler.dart
+++ b/pkg/analysis_server/lib/src/get_handler.dart
@@ -285,25 +285,33 @@ class GetHandler {
writeRow(PerformanceStatistics.lint, 'lint');
buffer.write('</table>');
- Map<DataDescriptor, int> countMap = SourceEntry.unflushedCountMap;
- buffer.write('<p><b>Number of times flushed data was re-created</b></p>');
- if (countMap.isEmpty) {
+ Map<DataDescriptor, Map<CacheState, int>> transitionMap = SourceEntry.transitionMap;
+ buffer.write('<p><b>Number of times a state transitioned to VALID (grouped by descriptor)</b></p>');
+ if (transitionMap.isEmpty) {
buffer.write('<p>none</p>');
} else {
- List<DataDescriptor> keys = countMap.keys.toList();
- keys.sort(
+ List<DataDescriptor> descriptors = transitionMap.keys.toList();
+ descriptors.sort(
(DataDescriptor first, DataDescriptor second) =>
first.toString().compareTo(second.toString()));
- buffer.write(
- '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
- _writeRow(buffer, ['Count', 'Data'], header: true);
- for (DataDescriptor key in keys) {
- _writeRow(
- buffer,
- [countMap[key], key.toString()],
- classes: ["right", null]);
+ for (DataDescriptor key in descriptors) {
+ Map<CacheState, int> countMap = transitionMap[key];
+ List<CacheState> oldStates = countMap.keys.toList();
+ oldStates.sort(
+ (CacheState first, CacheState second) =>
+ first.toString().compareTo(second.toString()));
+ buffer.write('<p>${key.toString()}</p>');
+ buffer.write(
+ '<table style="border-collapse: separate; border-spacing: 10px 5px;">');
+ _writeRow(buffer, ['Count', 'Previous State'], header: true);
+ for (CacheState state in oldStates) {
+ _writeRow(
+ buffer,
+ [countMap[state], state.toString()],
+ classes: ["right", null]);
+ }
+ buffer.write('</table>');
}
- buffer.write('</table>');
}
});
});
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/engine.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698