diff --git a/src/vs/workbench/api/node/extHostSearch.ts b/src/vs/workbench/api/node/extHostSearch.ts index c47fe8413f0..ada25a9c40f 100644 --- a/src/vs/workbench/api/node/extHostSearch.ts +++ b/src/vs/workbench/api/node/extHostSearch.ts @@ -40,7 +40,7 @@ export class NativeExtHostSearch extends ExtHostSearch { override $enableExtensionHostSearch(): void { const outputChannel = new OutputChannel('RipgrepSearchEH', this._logService); this.registerTextSearchProvider(Schemas.file, new RipgrepSearchProvider(outputChannel)); - this.registerInternalFileSearchProvider(Schemas.file, new SearchService()); + this.registerInternalFileSearchProvider(Schemas.file, new SearchService('fileSearchProvider')); } private registerInternalFileSearchProvider(scheme: string, provider: SearchService): IDisposable { diff --git a/src/vs/workbench/services/search/node/rawSearchService.ts b/src/vs/workbench/services/search/node/rawSearchService.ts index f5e19bdd076..4e8a5782041 100644 --- a/src/vs/workbench/services/search/node/rawSearchService.ts +++ b/src/vs/workbench/services/search/node/rawSearchService.ts @@ -30,6 +30,8 @@ export class SearchService implements IRawSearchService { private caches: { [cacheKey: string]: Cache; } = Object.create(null); + constructor(private readonly processType: IFileSearchStats['type'] = 'searchProcess') { } + fileSearch(config: IRawFileQuery): Event { let promise: CancelablePromise; @@ -124,7 +126,7 @@ export class SearchService implements IRawSearchService { type: 'success', stats: { detailStats: complete.stats, - type: 'searchProcess', + type: this.processType, fromCache: false, resultCount, sortingTime: undefined @@ -191,7 +193,7 @@ export class SearchService implements IRawSearchService { detailStats: result.stats, sortingTime, fromCache: false, - type: 'searchProcess', + type: this.processType, workspaceFolderCount: config.folderQueries.length, resultCount: sortedResults.length }, @@ -226,7 +228,7 @@ export class SearchService implements IRawSearchService { const stats: IFileSearchStats = { fromCache: true, detailStats: cacheStats, - type: 'searchProcess', + type: this.processType, resultCount: results.length, sortingTime };