| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library analysis_server.src.status.get_handler; | 5 library analysis_server.src.status.get_handler; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 import 'dart:io'; | 9 import 'dart:io'; |
| 10 import 'dart:math'; | 10 import 'dart:math'; |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 descriptors.sort(ResultDescriptor.SORT_BY_NAME); | 805 descriptors.sort(ResultDescriptor.SORT_BY_NAME); |
| 806 buffer.write('<p><b>Results computed after being flushed</b></p>'); | 806 buffer.write('<p><b>Results computed after being flushed</b></p>'); |
| 807 buffer.write( | 807 buffer.write( |
| 808 '<table style="border-collapse: separate; border-spacing: 10px 5px
;">'); | 808 '<table style="border-collapse: separate; border-spacing: 10px 5px
;">'); |
| 809 _writeRow(buffer, ['Result', 'Count'], header: true); | 809 _writeRow(buffer, ['Result', 'Count'], header: true); |
| 810 for (ResultDescriptor descriptor in descriptors) { | 810 for (ResultDescriptor descriptor in descriptors) { |
| 811 _writeRow(buffer, [descriptor.name, recomputedCounts[descriptor]], | 811 _writeRow(buffer, [descriptor.name, recomputedCounts[descriptor]], |
| 812 classes: [null, "right"]); | 812 classes: [null, "right"]); |
| 813 } | 813 } |
| 814 buffer.write('</table>'); | 814 buffer.write('</table>'); |
| 815 |
| 816 { |
| 817 buffer.write('<p><b>Cache consistency statistics</b></p>'); |
| 818 buffer.write( |
| 819 '<table style="border-collapse: separate; border-spacing: 10px 5
px;">'); |
| 820 _writeRow(buffer, ['Name', 'Count'], header: true); |
| 821 _writeRow(buffer, [ |
| 822 'Modified', |
| 823 PerformanceStatistics |
| 824 .cacheConsistencyValidationStatistics.numOfModified |
| 825 ], classes: [ |
| 826 null, |
| 827 "right" |
| 828 ]); |
| 829 _writeRow(buffer, [ |
| 830 'Deleted', |
| 831 PerformanceStatistics |
| 832 .cacheConsistencyValidationStatistics.numOfDeleted |
| 833 ], classes: [ |
| 834 null, |
| 835 "right" |
| 836 ]); |
| 837 buffer.write('</table>'); |
| 838 } |
| 815 }, (StringBuffer buffer) { | 839 }, (StringBuffer buffer) { |
| 816 // | 840 // |
| 817 // Write task model timing information. | 841 // Write task model timing information. |
| 818 // | 842 // |
| 819 buffer.write('<p><b>Task performance data</b></p>'); | 843 buffer.write('<p><b>Task performance data</b></p>'); |
| 820 buffer.write( | 844 buffer.write( |
| 821 '<table style="border-collapse: separate; border-spacing: 10px 5px
;">'); | 845 '<table style="border-collapse: separate; border-spacing: 10px 5px
;">'); |
| 822 _writeRow( | 846 _writeRow( |
| 823 buffer, | 847 buffer, |
| 824 [ | 848 [ |
| (...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 */ | 2647 */ |
| 2624 static String makeLink( | 2648 static String makeLink( |
| 2625 String path, Map<String, String> params, String innerHtml, | 2649 String path, Map<String, String> params, String innerHtml, |
| 2626 [bool hasError = false]) { | 2650 [bool hasError = false]) { |
| 2627 Uri uri = new Uri(path: path, queryParameters: params); | 2651 Uri uri = new Uri(path: path, queryParameters: params); |
| 2628 String href = HTML_ESCAPE.convert(uri.toString()); | 2652 String href = HTML_ESCAPE.convert(uri.toString()); |
| 2629 String classAttribute = hasError ? ' class="error"' : ''; | 2653 String classAttribute = hasError ? ' class="error"' : ''; |
| 2630 return '<a href="$href"$classAttribute>$innerHtml</a>'; | 2654 return '<a href="$href"$classAttribute>$innerHtml</a>'; |
| 2631 } | 2655 } |
| 2632 } | 2656 } |
| OLD | NEW |