remove unused performance tracking
Change-Id: I4753c140afbeec9d2859bc6f544f0b916932a290
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345742
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
diff --git a/pkg/analysis_server/lib/src/cider/completion.dart b/pkg/analysis_server/lib/src/cider/completion.dart
index ca96450..219750a 100644
--- a/pkg/analysis_server/lib/src/cider/completion.dart
+++ b/pkg/analysis_server/lib/src/cider/completion.dart
@@ -193,10 +193,7 @@
performance.getDataInt('libraryCount').increment();
var path = element.source.fullName;
- var signature = _fileResolver.getLibraryLinkedSignature(
- path: path,
- performance: performance,
- );
+ var signature = _fileResolver.getLibraryLinkedSignature(path);
var cacheEntry = _cache._importedLibraries[path];
if (cacheEntry == null || cacheEntry.signature != signature) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 4136612..838bb2b 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -37,7 +37,6 @@
import 'package:analyzer/src/summary/package_bundle_reader.dart';
import 'package:analyzer/src/summary2/informative_data.dart';
import 'package:analyzer/src/util/file_paths.dart' as file_paths;
-import 'package:analyzer/src/util/performance/operation_performance.dart';
import 'package:analyzer/src/util/uri.dart';
import 'package:analyzer/src/utilities/extensions/collection.dart';
import 'package:analyzer/src/utilities/uri_cache.dart';
@@ -1286,20 +1285,7 @@
/// Return the [FileState] for the given absolute [path]. The returned file
/// has the last known state since if was last refreshed.
- // TODO(scheglov): Merge with [getFileForPath2].
FileState getFileForPath(String path) {
- return getFileForPath2(
- path: path,
- performance: OperationPerformanceImpl('<root>'),
- );
- }
-
- /// Return the [FileState] for the given absolute [path]. The returned file
- /// has the last known state since if was last refreshed.
- FileState getFileForPath2({
- required String path,
- required OperationPerformanceImpl performance,
- }) {
var file = _pathToFile[path];
if (file == null) {
File resource = resourceProvider.getFile(path);
@@ -2351,10 +2337,7 @@
for (final sibling in siblings) {
if (file_paths.isDart(pathContext, sibling.path)) {
- file._fsState.getFileForPath2(
- path: sibling.path,
- performance: OperationPerformanceImpl('<root>'),
- );
+ file._fsState.getFileForPath(sibling.path);
}
}
}
diff --git a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
index f7a7a3d..5141c68 100644
--- a/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
+++ b/pkg/analyzer/lib/src/dart/micro/resolve_file.dart
@@ -380,10 +380,7 @@
});
var file = performance.run('fileForPath', (performance) {
- return fsState!.getFileForPath2(
- path: path,
- performance: performance,
- );
+ return fsState!.getFileForPath(path);
});
return FileContext(analysisOptions, file);
@@ -433,16 +430,10 @@
return libraryContext!.elementFactory.libraryOfUri2(uri);
}
- String getLibraryLinkedSignature({
- required String path,
- required OperationPerformanceImpl performance,
- }) {
+ String getLibraryLinkedSignature(String path) {
_throwIfNotAbsoluteNormalizedPath(path);
- var file = fsState!.getFileForPath2(
- path: path,
- performance: performance,
- );
+ var file = fsState!.getFileForPath(path);
// TODO(scheglov): Casts are unsafe.
final kind = file.kind as LibraryFileKind;