44import { Event , EventEmitter } from 'vscode' ;
55import '../../../../common/extensions' ;
66import { createDeferred } from '../../../../common/utils/async' ;
7- import { StopWatch } from '../../../../common/utils/stopWatch' ;
87import { traceError } from '../../../../logging' ;
9- import { sendTelemetryEvent } from '../../../../telemetry' ;
10- import { EventName } from '../../../../telemetry/constants' ;
118import { normalizePath } from '../../../common/externalDependencies' ;
129import { PythonEnvInfo } from '../../info' ;
13- import { getEnvPath } from '../../info/env' ;
1410import { IDiscoveryAPI , IPythonEnvsIterator , IResolvingLocator , PythonLocatorQuery } from '../../locator' ;
1511import { getQueryFilter } from '../../locatorUtils' ;
1612import { PythonEnvCollectionChangedEvent , PythonEnvsWatcher } from '../../watcher' ;
@@ -95,7 +91,6 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
9591 }
9692
9793 private startRefresh ( query : ( PythonLocatorQuery & { clearCache ?: boolean } ) | undefined ) : Promise < void > {
98- const stopWatch = new StopWatch ( ) ;
9994 const deferred = createDeferred < void > ( ) ;
10095
10196 if ( query ?. clearCache ) {
@@ -111,13 +106,6 @@ export class EnvsCollectionService extends PythonEnvsWatcher<PythonEnvCollection
111106 // Ensure we delete this before we resolve the promise to accurately track when a refresh finishes.
112107 this . refreshPromises . delete ( query ) ;
113108 deferred . resolve ( ) ;
114- sendTelemetryEvent ( EventName . PYTHON_INTERPRETER_DISCOVERY , stopWatch . elapsedTime , {
115- interpreters : this . cache . getAllEnvs ( ) . length ,
116- environmentsWithoutPython : this . cache
117- . getAllEnvs ( )
118- . filter ( ( e ) => getEnvPath ( e . executable . filename , e . location ) . pathType === 'envFolderPath' )
119- . length ,
120- } ) ;
121109 } )
122110 . catch ( ( ex ) => deferred . reject ( ex ) ) ;
123111 }
0 commit comments