"use strict";
//
//  Copyright (c) Microsoft Corporation. All rights reserved.
//
Object.defineProperty(exports, "__esModule", { value: true });
exports.ChannelMetrics = void 0;
/**
 * Collects cumulative measurements about a channel.
 */
class ChannelMetrics {
    /* @internal */
    constructor() {
        this.bytesSentSum = 0;
        this.bytesReceivedSum = 0;
    }
    /**
     * Gets the total cumulative number of bytes sent for the duration of the channel,
     * not including message framing, padding, and MAC bytes.
     */
    get bytesSent() {
        return this.bytesSentSum;
    }
    /**
     * Gets the total cumulative number of bytes received for the duration of the channel,
     * not including message framing, padding, and MAC bytes.
     */
    get bytesReceived() {
        return this.bytesReceivedSum;
    }
    /* @internal */
    addBytesSent(count) {
        this.bytesSentSum += count;
    }
    /* @internal */
    addBytesReceived(count) {
        this.bytesReceivedSum += count;
    }
    toString() {
        return `Bytes S/R: ${this.bytesSent} / ${this.bytesReceived}; `;
    }
}
exports.ChannelMetrics = ChannelMetrics;
//# sourceMappingURL=https://github.com/VSCodium/sourcemaps/releases/download/stable-824c4c46a288b839f13b24022655329c2aeb9f81/node_modules-@microsoft-dev-tunnels-ssh-metrics-channelMetrics.js.map