UNPKG

@microsoft/dev-tunnels-ssh

Version:
107 lines 4.16 kB
/** * Collects current and cumulative measurements about a session. */ export declare class SessionMetrics { private startTime; private messagesSentCount; private messagesReceivedCount; private bytesSentSum; private bytesReceivedSum; private reconnectionsCount; private currentLatency; private minLatency; private maxLatency; private latencySum; private latencyCount; private browserTime; private nodejsTime; /** * Gets the total cumulative number of messages sent for the duration of the session, * including all channels and non-channel protocol messages. */ get messagesSent(): number; /** * Gets the total cumulative number of messages received for the duration of the session, * including all channels and non-channel protocol messages. */ get messagesReceived(): number; /** * Gets the total cumulative number of bytes sent for the duration of the session, * including all channels and non-channel protocol messages, and including message * framing, padding, and MAC bytes. */ get bytesSent(): number; /** * Gets the total cumulative number of bytes received for the duration of the session, * including all channels and non-channel protocol messages, and including message * framing, padding, and MAC bytes. */ get bytesReceived(): number; /** * Gets the number of times the session has reconnected. * </summary> * <remarks> * Reconnection requires both sides to support the * <see cref="SshProtocolExtensionNames.SessionReconnect" /> protocol extension. */ get reconnections(): number; /** * Gets the average measured round-trip connection latency between client and server * over the duration of the session, in milliseconds. * </summary> * <remarks> * Latency measurement requires both sides to support the * <see cref="SshProtocolExtensionNames.SessionLatency" /> protocol extension. * If not supported, this Sum will be 0. */ get latencyAverageMs(): number; /** * Gets the minimum measured round-trip connection latency between client and server * over the duration of the session, in milliseconds. * </summary> * <remarks> * Latency measurement requires both sides to support the * <see cref="SshProtocolExtensionNames.SessionLatency" /> protocol extension. * If not supported, this Sum will be 0. */ get latencyMinMs(): number; /** * Gets the maximum measured round-trip connection latency between client and server * over the duration of the session, in milliseconds. * </summary> * <remarks> * Latency measurement requires both sides to support the * <see cref="SshProtocolExtensionNames.SessionLatency" /> protocol extension. * If not supported, this Sum will be 0. */ get latencyMaxMs(): number; /** * Gets the most recent measurement of round-trip connection latency between client and * server, in milliseconds. * </summary> * <remarks> * Latency measurement requires both sides to support the * <see cref="SshProtocolExtensionNames.SessionLatency" /> protocol extension. * If not supported or the session is not currently connected, this Sum will be 0. */ get latencyCurrentMs(): number; private readonly messageSentEmitter; readonly onMessageSent: import("vscode-jsonrpc").Event<{ time: number; size: number; }>; private readonly messageReceivedEmitter; readonly onMessageReceived: import("vscode-jsonrpc").Event<{ time: number; size: number; }>; private readonly latencyUpdatedEmitter; readonly onLatencyUpdated: import("vscode-jsonrpc").Event<{ time: number; latency: number; }>; private readonly sessionClosedEmitter; readonly onSessionClosed: import("vscode-jsonrpc").Event<void>; toString(): string; } //# sourceMappingURL=sessionMetrics.d.ts.map