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

Side by Side Diff: pkg/analyzer/lib/task/model.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, 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 unified diff | Download patch
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 analyzer.task.model; 5 library analyzer.task.model;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:developer'; 8 import 'dart:developer';
9 9
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 int measure(T object); 450 int measure(T object);
451 } 451 }
452 452
453 /** 453 /**
454 * A description of an analysis result that can be computed by an [AnalysisTask] . 454 * A description of an analysis result that can be computed by an [AnalysisTask] .
455 * 455 *
456 * Clients may not extend, implement or mix-in this class. 456 * Clients may not extend, implement or mix-in this class.
457 */ 457 */
458 abstract class ResultDescriptor<V> { 458 abstract class ResultDescriptor<V> {
459 /** 459 /**
460 * A comparator that can be used to sort result descriptors by their name.
461 */
462 static final Comparator<ResultDescriptor> SORT_BY_NAME =
463 (ResultDescriptor first, ResultDescriptor second) =>
464 first.name.compareTo(second.name);
465
466 /**
460 * Initialize a newly created analysis result to have the given [name] and 467 * Initialize a newly created analysis result to have the given [name] and
461 * [defaultValue]. 468 * [defaultValue].
462 * 469 *
463 * The given [cachingPolicy] is used to limit the total size of results 470 * The given [cachingPolicy] is used to limit the total size of results
464 * described by this descriptor. If no policy is specified, the results are 471 * described by this descriptor. If no policy is specified, the results are
465 * never evicted from the cache, and removed only when they are invalidated. 472 * never evicted from the cache, and removed only when they are invalidated.
466 */ 473 */
467 factory ResultDescriptor(String name, V defaultValue, 474 factory ResultDescriptor(String name, V defaultValue,
468 {ResultCachingPolicy<V> cachingPolicy}) = ResultDescriptorImpl<V>; 475 {ResultCachingPolicy<V> cachingPolicy}) = ResultDescriptorImpl<V>;
469 476
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 /** 771 /**
765 * A work should be done, but without any special urgency. 772 * A work should be done, but without any special urgency.
766 */ 773 */
767 NORMAL, 774 NORMAL,
768 775
769 /** 776 /**
770 * Nothing to do. 777 * Nothing to do.
771 */ 778 */
772 NONE 779 NONE
773 } 780 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698