diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.ts index f854d0c75a013..88175988d9a1c 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorActions.ts @@ -139,7 +139,12 @@ export const openNewSearchEditor = } } - telemetryService.publicLog2<{}, { owner: 'roblourens'; comment: 'TODO @roblourens' }>('searchEditor/openNewSearchEditor'); + telemetryService.publicLog2<{}, + { + owner: 'roblourens'; + comment: 'Fired when a search editor is opened'; + }> + ('searchEditor/openNewSearchEditor'); const seedSearchStringFromSelection = _args.location === 'new' || configurationService.getValue('editor').find!.seedSearchStringFromSelection; const args: OpenSearchEditorArgs = { query: seedSearchStringFromSelection ? selected : undefined }; @@ -188,8 +193,13 @@ export const createEditorFromSearchResult = const configurationService = accessor.get(IConfigurationService); const sortOrder = configurationService.getValue('search').sortOrder; - - telemetryService.publicLog2<{}, { owner: 'roblourens'; comment: 'TODO @roblourens' }>('searchEditor/createEditorFromSearchResult'); + telemetryService.publicLog2< + {}, + { + owner: 'roblourens'; + comment: 'Fired when a search editor is opened from the search view'; + }> + ('searchEditor/createEditorFromSearchResult'); const labelFormatter = (uri: URI): string => labelService.getUriLabel(uri, { relative: true }); diff --git a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts index 3481a3c49783d..cb9c0e342b523 100644 --- a/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts +++ b/src/vs/workbench/contrib/searchEditor/browser/searchEditorInput.ts @@ -184,7 +184,13 @@ export class SearchEditorInput extends EditorInput { override async saveAs(group: GroupIdentifier, options?: ITextFileSaveOptions): Promise { const path = await this.fileDialogService.pickFileToSave(await this.suggestFileName(), options?.availableFileSystems); if (path) { - this.telemetryService.publicLog2<{}, { owner: 'roblourens'; comment: 'TODO @roblourens' }>('searchEditor/saveSearchResults'); + this.telemetryService.publicLog2< + {}, + { + owner: 'roblourens'; + comment: 'Fired when a search editor is saved'; + }> + ('searchEditor/saveSearchResults'); const toWrite = await this.serializeForDisk(); if (await this.textFileService.create([{ resource: path, value: toWrite, options: { overwrite: true } }])) { this.setDirty(false); diff --git a/src/vs/workbench/services/search/common/searchService.ts b/src/vs/workbench/services/search/common/searchService.ts index 4d6a8cc305f1b..874de93dad5e7 100644 --- a/src/vs/workbench/services/search/common/searchService.ts +++ b/src/vs/workbench/services/search/common/searchService.ts @@ -283,24 +283,22 @@ export class SearchService extends Disposable implements ISearchService { type CachedSearchCompleteClassifcation = { owner: 'roblourens'; - comment: 'TODO @roblourens'; - reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - cacheWasResolved: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - cacheLookupTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - cacheFilterTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - cacheEntryCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; + comment: 'Fired when a file search is completed from previously cached results'; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Indicates which extension or UI feature triggered this search' }; + resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of search results' }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of folders in the workspace' }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The total search time' }; + sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent sorting results' }; + cacheWasResolved: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Whether the cache was already resolved when the search began' }; + cacheLookupTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent looking up the cache to use for the search' }; + cacheFilterTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent searching within the cache' }; + cacheEntryCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of entries in the searched-in cache' }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The uri scheme of the folder searched in' }; }; type CachedSearchCompleteEvent = { reason?: string; resultCount: number; workspaceFolderCount: number; - type: 'fileSearchProvider' | 'searchProcess'; endToEndTime: number; sortingTime?: number; cacheWasResolved: boolean; @@ -313,7 +311,6 @@ export class SearchService extends Disposable implements ISearchService { reason: query._reason, resultCount: fileSearchStats.resultCount, workspaceFolderCount: query.folderQueries.length, - type: fileSearchStats.type, endToEndTime: endToEndTime, sortingTime: fileSearchStats.sortingTime, cacheWasResolved: cacheStats.cacheWasResolved, @@ -327,25 +324,23 @@ export class SearchService extends Disposable implements ISearchService { type SearchCompleteClassification = { owner: 'roblourens'; - comment: 'TODO @roblourens'; - reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - type: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - fileWalkTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - directoriesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - filesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - cmdTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - cmdResultCount?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; + comment: 'Fired when a file search is completed'; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Indicates which extension or UI feature triggered this search' }; + resultCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of search results' }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of folders in the workspace' }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The total search time' }; + sortingTime?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent sorting results' }; + fileWalkTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent walking file system' }; + directoriesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of directories walked' }; + filesWalked: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of files walked' }; + cmdTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The amount of time spent running the search command' }; + cmdResultCount?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of results returned from the search command' }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The uri scheme of the folder searched in' }; }; type SearchCompleteEvent = { reason?: string; resultCount: number; workspaceFolderCount: number; - type: 'fileSearchProvider' | 'searchProcess'; endToEndTime: number; sortingTime?: number; fileWalkTime: number; @@ -361,7 +356,6 @@ export class SearchService extends Disposable implements ISearchService { reason: query._reason, resultCount: fileSearchStats.resultCount, workspaceFolderCount: query.folderQueries.length, - type: fileSearchStats.type, endToEndTime: endToEndTime, sortingTime: fileSearchStats.sortingTime, fileWalkTime: searchEngineStats.fileWalkTime, @@ -386,13 +380,12 @@ export class SearchService extends Disposable implements ISearchService { type TextSearchCompleteClassification = { owner: 'roblourens'; - comment: 'TODO @roblourens'; - reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'TODO @roblourens' }; - scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - error?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; - usePCRE2: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'TODO @roblourens' }; + comment: 'Fired when a text search is completed'; + reason?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'Indicates which extension or UI feature triggered this search' }; + workspaceFolderCount: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The number of folders in the workspace' }; + endToEndTime: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; isMeasurement: true; comment: 'The total search time' }; + scheme: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The uri scheme of the folder searched in' }; + error?: { classification: 'SystemMetaData'; purpose: 'PerformanceAndHealth'; comment: 'The type of the error, if any' }; }; type TextSearchCompleteEvent = { reason?: string; @@ -400,7 +393,6 @@ export class SearchService extends Disposable implements ISearchService { endToEndTime: number; scheme: string; error?: string; - usePCRE2: boolean; }; this.telemetryService.publicLog2('textSearchComplete', { reason: query._reason, @@ -408,7 +400,6 @@ export class SearchService extends Disposable implements ISearchService { endToEndTime: endToEndTime, scheme, error: errorType, - usePCRE2: !!query.usePCRE2 }); } }