mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 10:08:49 +01:00
#56950 - add details to text search telemetry
This commit is contained in:
@@ -302,10 +302,10 @@ class TextSearchEngine {
|
||||
this.activeCancellationTokens = new Set();
|
||||
}
|
||||
|
||||
public search(onProgress: (matches: IFileMatch[]) => void): TPromise<{ limitHit: boolean }> {
|
||||
public search(onProgress: (matches: IFileMatch[]) => void): TPromise<ISearchCompleteStats> {
|
||||
const folderQueries = this.config.folderQueries;
|
||||
|
||||
return new TPromise<{ limitHit: boolean }>((resolve, reject) => {
|
||||
return new TPromise<ISearchCompleteStats>((resolve, reject) => {
|
||||
this.collector = new TextSearchResultsCollector(onProgress);
|
||||
|
||||
const onResult = (match: vscode.TextSearchResult, folderIdx: number) => {
|
||||
@@ -329,7 +329,12 @@ class TextSearchEngine {
|
||||
return this.searchInFolder(fq, r => onResult(r, i));
|
||||
})).then(() => {
|
||||
this.collector.flush();
|
||||
resolve({ limitHit: this.isLimitHit });
|
||||
resolve({
|
||||
limitHit: this.isLimitHit,
|
||||
stats: {
|
||||
type: 'textSearchProvider'
|
||||
}
|
||||
});
|
||||
}, (errs: Error[]) => {
|
||||
const errMsg = errs
|
||||
.map(err => toErrorMessage(err))
|
||||
|
||||
Reference in New Issue
Block a user