mirror of
https://github.com/vector-im/element-call.git
synced 2026-04-06 07:20:25 +00:00
@@ -206,7 +206,7 @@ export class CallDisconnectedEventTracker {
|
|||||||
interface CallConnectDuration extends IPosthogEvent {
|
interface CallConnectDuration extends IPosthogEvent {
|
||||||
eventName: "CallConnectDuration";
|
eventName: "CallConnectDuration";
|
||||||
totalDuration: number;
|
totalDuration: number;
|
||||||
websockedDuration: number;
|
websocketDuration: number;
|
||||||
peerConnectionDuration: number;
|
peerConnectionDuration: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,12 +228,12 @@ export class CallConnectDurationTracker {
|
|||||||
PosthogAnalytics.instance.trackEvent<CallConnectDuration>({
|
PosthogAnalytics.instance.trackEvent<CallConnectDuration>({
|
||||||
eventName: "CallConnectDuration",
|
eventName: "CallConnectDuration",
|
||||||
totalDuration,
|
totalDuration,
|
||||||
websocketDuration: this.websocketConnected - this.connectStart,
|
websocketDuration,
|
||||||
peerConnectionDuration: Date.now() - this.websocketConnected,
|
peerConnectionDuration,
|
||||||
});
|
});
|
||||||
if (options.log)
|
if (options.log)
|
||||||
logger.log(
|
logger.log(
|
||||||
`Time to connect:\ntotal: ${totalDuration}ms\npeerConnection: ${websockedDuration}ms\nwebsocket: ${peerConnectionDuration}ms`,
|
`Time to connect:\ntotal: ${totalDuration}ms\npeerConnection: ${websocketDuration}ms\nwebsocket: ${peerConnectionDuration}ms`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user