tpshist

package
v0.0.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tpshist 定义生成速度(TPS, tokens/s)直方图档位;插值复用 histutil。 档位偏 20-300 tokens/s 密集(TPS 主分布区)。改档必须配套 rebuild 回填。

Index

Constants

View Source
const NumSlots = 17

Variables

View Source
var Edges = [NumSlots - 1]int64{
	5, 10, 20, 30, 40, 50, 75, 100,
	125, 150, 200, 250, 300, 400, 500, 750,
}

Functions

func EstimateP5

func EstimateP5(counts [NumSlots]int64, maxTps int64) int64

func EstimatePercentile

func EstimatePercentile(counts [NumSlots]int64, p float64, maxTps int64) int64

func SlotIndex

func SlotIndex(tps int64) int

func TokensPerSecond

func TokensPerSecond(tokens, generationMs int64) int64

TokensPerSecond computes tokens*1000/generationMs without overflowing.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL