From fe83134fb36dbdc2e5e0efd5d5047c99621da49a Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 24 Jul 2024 05:49:22 +1000 Subject: [PATCH 1/2] Rename duration measurement --- .../base/locators/common/nativePythonTelemetry.ts | 2 +- src/client/telemetry/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts index 6675ca3a7ce7..b37a94ad73fa 100644 --- a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts +++ b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts @@ -112,7 +112,7 @@ export function sendNativeTelemetry( } refreshTelemetrySent = true; sendTelemetryEvent(EventName.NATIVE_FINDER_PERF, { - duration: data.data.refreshPerformance.total, + totalDuration: data.data.refreshPerformance.total, breakdownGlobalVirtualEnvs: data.data.refreshPerformance.breakdown.GlobalVirtualEnvs, breakdownLocators: data.data.refreshPerformance.breakdown.Locators, breakdownPath: data.data.refreshPerformance.breakdown.Path, diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index 8383409d141a..13fdf8ca8844 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -1737,7 +1737,7 @@ export interface IEventNamePropertyMapping { */ /* __GDPR__ "native_finder_perf" : { - "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, + "totalDuration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "breakdownLocators" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "breakdownPath" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "breakdownGlobalVirtualEnvs" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, @@ -1767,7 +1767,7 @@ export interface IEventNamePropertyMapping { * This is the time from the perspective of the Native Locator. * I.e. starting from the time the request to refresh was received until the end of the refresh. */ - duration: number; + totalDuration: number; /** * Time taken by all locators to find the environments. * I.e. time for Conda + Poetry + Pyenv, etc (note: all of them run in parallel). From 63d412dfcc8240c9509f75d3479d89af41edf878 Mon Sep 17 00:00:00 2001 From: Don Jayamanne Date: Wed, 24 Jul 2024 06:14:09 +1000 Subject: [PATCH 2/2] add duration as well --- .../base/locators/common/nativePythonTelemetry.ts | 1 + src/client/telemetry/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts index b37a94ad73fa..489b9a98c4aa 100644 --- a/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts +++ b/src/client/pythonEnvironments/base/locators/common/nativePythonTelemetry.ts @@ -112,6 +112,7 @@ export function sendNativeTelemetry( } refreshTelemetrySent = true; sendTelemetryEvent(EventName.NATIVE_FINDER_PERF, { + duration: data.data.refreshPerformance.total, totalDuration: data.data.refreshPerformance.total, breakdownGlobalVirtualEnvs: data.data.refreshPerformance.breakdown.GlobalVirtualEnvs, breakdownLocators: data.data.refreshPerformance.breakdown.Locators, diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index 13fdf8ca8844..e995ec6d53eb 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -1737,6 +1737,7 @@ export interface IEventNamePropertyMapping { */ /* __GDPR__ "native_finder_perf" : { + "duration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "totalDuration" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "breakdownLocators" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" }, "breakdownPath" : { "classification": "SystemMetaData", "purpose": "FeatureInsight", "isMeasurement": true, "owner": "donjayamanne" },