Skip to content

Commit a178ce4

Browse files
committed
chore: 跳过开发阶段的性能检测
1 parent ae9c14e commit a178ce4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/core/telemetry.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ class Telemetry implements IInjectable {
4242
this.appInsights.loadAppInsights();
4343
}
4444

45+
if (__DEV__) {
46+
// 开发模式不启用性能服务检测
47+
return;
48+
}
4549
// 延迟20秒后检查,先让出主线程
4650
delay(20000, true).then(async () => {
4751
const telemetryCheckTimestamp = appMeta.telemetryCheckTimestamp;
@@ -66,6 +70,10 @@ class Telemetry implements IInjectable {
6670
}
6771

6872
private checkTelemetryEnabled(withUserPerference: boolean = true): boolean {
73+
if (__DEV__) {
74+
return false;
75+
}
76+
6977
if (!this.appInsights) {
7078
return false;
7179
}

0 commit comments

Comments
 (0)