mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
Merge pull request #208357 from microsoft/surrounding-pheasant
add quick access log for beginning of fileSearch call
This commit is contained in:
commit
93b7e320e3
|
@ -55,6 +55,7 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
|
|||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
import { ASK_QUICK_QUESTION_ACTION_ID } from 'vs/workbench/contrib/chat/browser/actions/chatQuickInputActions';
|
||||
import { IQuickChatService } from 'vs/workbench/contrib/chat/browser/chat';
|
||||
import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
interface IAnythingQuickPickItem extends IPickerQuickAccessItem, IQuickPickItemWithResource { }
|
||||
|
||||
|
@ -162,6 +163,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
@IQuickInputService private readonly quickInputService: IQuickInputService,
|
||||
@IKeybindingService private readonly keybindingService: IKeybindingService,
|
||||
@IQuickChatService private readonly quickChatService: IQuickChatService,
|
||||
@ILogService private readonly logService: ILogService
|
||||
) {
|
||||
super(AnythingQuickAccessProvider.PREFIX, {
|
||||
canAcceptInBackground: true,
|
||||
|
@ -644,6 +646,7 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
}
|
||||
|
||||
private doGetFileSearchResults(filePattern: string, token: CancellationToken): Promise<ISearchComplete> {
|
||||
const start = Date.now();
|
||||
return this.searchService.fileSearch(
|
||||
this.fileQueryBuilder.file(
|
||||
this.contextService.getWorkspace().folders,
|
||||
|
@ -652,7 +655,9 @@ export class AnythingQuickAccessProvider extends PickerQuickAccessProvider<IAnyt
|
|||
cacheKey: this.pickState.fileQueryCache?.cacheKey,
|
||||
maxResults: AnythingQuickAccessProvider.MAX_RESULTS
|
||||
})
|
||||
), token);
|
||||
), token).finally(() => {
|
||||
this.logService.trace(`QuickAccess fileSearch ${Date.now() - start}ms`);
|
||||
});
|
||||
}
|
||||
|
||||
private getFileQueryOptions(input: { filePattern?: string; cacheKey?: string; maxResults?: number }): IFileQueryBuilderOptions {
|
||||
|
|
Loading…
Reference in a new issue