@@ -79,6 +79,8 @@ export type RefreshPerformance = {
79
79
} ;
80
80
} ;
81
81
82
+ let refreshTelemetrySent = false ;
83
+
82
84
export function sendNativeTelemetry ( data : NativePythonTelemetry ) : void {
83
85
switch ( data . event ) {
84
86
case 'MissingCondaEnvironments' : {
@@ -98,26 +100,30 @@ export function sendNativeTelemetry(data: NativePythonTelemetry): void {
98
100
break ;
99
101
}
100
102
case 'RefreshPerformance' : {
101
- sendTelemetryEvent ( EventName . NATIVE_FINDER_PERF , undefined , {
103
+ if ( refreshTelemetrySent ) {
104
+ break ;
105
+ }
106
+ refreshTelemetrySent = true ;
107
+ sendTelemetryEvent ( EventName . NATIVE_FINDER_PERF , {
102
108
duration : data . data . refreshPerformance . total ,
103
109
breakdownGlobalVirtualEnvs : data . data . refreshPerformance . breakdown . GlobalVirtualEnvs ,
104
110
breakdownLocators : data . data . refreshPerformance . breakdown . Locators ,
105
111
breakdownPath : data . data . refreshPerformance . breakdown . Path ,
106
112
breakdownWorkspaces : data . data . refreshPerformance . breakdown . Workspaces ,
107
- locatorConda : data . data . refreshPerformance . locators . Conda ,
108
- locatorHomebrew : data . data . refreshPerformance . locators . Homebrew ,
109
- locatorLinuxGlobalPython : data . data . refreshPerformance . locators . LinuxGlobalPython ,
110
- locatorMacCmdLineTools : data . data . refreshPerformance . locators . MacCmdLineTools ,
111
- locatorMacPythonOrg : data . data . refreshPerformance . locators . MacPythonOrg ,
112
- locatorMacXCode : data . data . refreshPerformance . locators . MacXCode ,
113
- locatorPipEnv : data . data . refreshPerformance . locators . PipEnv ,
114
- locatorPoetry : data . data . refreshPerformance . locators . Poetry ,
115
- locatorPyEnv : data . data . refreshPerformance . locators . PyEnv ,
116
- locatorVenv : data . data . refreshPerformance . locators . Venv ,
117
- locatorVirtualEnv : data . data . refreshPerformance . locators . VirtualEnv ,
118
- locatorVirtualEnvWrapper : data . data . refreshPerformance . locators . VirtualEnvWrapper ,
119
- locatorWindowsRegistry : data . data . refreshPerformance . locators . WindowsRegistry ,
120
- locatorWindowsStore : data . data . refreshPerformance . locators . WindowsStore ,
113
+ locatorConda : data . data . refreshPerformance . locators . Conda || 0 ,
114
+ locatorHomebrew : data . data . refreshPerformance . locators . Homebrew || 0 ,
115
+ locatorLinuxGlobalPython : data . data . refreshPerformance . locators . LinuxGlobalPython || 0 ,
116
+ locatorMacCmdLineTools : data . data . refreshPerformance . locators . MacCmdLineTools || 0 ,
117
+ locatorMacPythonOrg : data . data . refreshPerformance . locators . MacPythonOrg || 0 ,
118
+ locatorMacXCode : data . data . refreshPerformance . locators . MacXCode || 0 ,
119
+ locatorPipEnv : data . data . refreshPerformance . locators . PipEnv || 0 ,
120
+ locatorPoetry : data . data . refreshPerformance . locators . Poetry || 0 ,
121
+ locatorPyEnv : data . data . refreshPerformance . locators . PyEnv || 0 ,
122
+ locatorVenv : data . data . refreshPerformance . locators . Venv || 0 ,
123
+ locatorVirtualEnv : data . data . refreshPerformance . locators . VirtualEnv || 0 ,
124
+ locatorVirtualEnvWrapper : data . data . refreshPerformance . locators . VirtualEnvWrapper || 0 ,
125
+ locatorWindowsRegistry : data . data . refreshPerformance . locators . WindowsRegistry || 0 ,
126
+ locatorWindowsStore : data . data . refreshPerformance . locators . WindowsStore || 0 ,
121
127
} ) ;
122
128
break ;
123
129
}
0 commit comments