Socket
Book a DemoInstallSign in
Socket

@svta/cml-throughput

Package Overview
Dependencies
Maintainers
0
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svta/cml-throughput

Throughput estimation functionality

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
0
Created
Source

@svta/cml-throughput

Throughput estimation functionality.

Installation

npm i @svta/cml-throughput

Usage

import { EwmaEstimator } from "@svta/cml-throughput/EwmaEstimator";

const estimator = new EwmaEstimator({ fastHalfLife: 2, slowHalfLife: 5 });

// 500 bps
estimator.sample({
	startTime: 0,
	encodedBodySize: 125,
	duration: 2000,
});

// 250 bps
estimator.sample({
	startTime: 2000,
	encodedBodySize: 125,
	duration: 4000,
});

assert(estimator.getEstimate() === 412);

Keywords

Common Media Library

FAQs

Package last updated on 26 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts