提交 b0cb3ddc 编写于 作者: R Rob Lourens

Fix #80251

上级 3ba84a8c
......@@ -982,16 +982,7 @@ export class SearchModel extends Disposable {
*/
onFirstRenderStopwatch(duration => this.telemetryService.publicLog('searchResultsFirstRender', { duration }));
const onDoneStopwatch = Event.stopwatch(onDone);
const start = Date.now();
/* __GDPR__
"searchResultsFinished" : {
"duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
}
*/
onDoneStopwatch(duration => this.telemetryService.publicLog('searchResultsFinished', { duration }));
currentRequest.then(
value => this.onSearchCompleted(value, Date.now() - start),
e => this.onSearchError(e, Date.now() - start));
......@@ -1000,6 +991,13 @@ export class SearchModel extends Disposable {
}
private onSearchCompleted(completed: ISearchComplete | null, duration: number): ISearchComplete | null {
/* __GDPR__
"searchResultsFinished" : {
"duration" : { "classification": "SystemMetaData", "purpose": "PerformanceAndHealth", "isMeasurement": true }
}
*/
this.telemetryService.publicLog('searchResultsFinished', { duration });
if (!this._searchQuery) {
throw new Error('onSearchCompleted must be called after a search is started');
}
......
......@@ -158,7 +158,7 @@ suite('SearchModel', () => {
const testObject: SearchModel = instantiationService.createInstance(SearchModel);
await testObject.search({ contentPattern: { pattern: 'somestring' }, type: 1, folderQueries });
await timeout(0); // TODO@rob https://github.com/microsoft/vscode/issues/80251
// await timeout(0); // TODO@rob https://github.com/microsoft/vscode/issues/80251
assert.ok(target.calledThrice);
const data = target.args[0];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册