bench

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EstimateTokens

func EstimateTokens(utf8Bytes int) int

Types

type Input

type Input struct {
	RawBytes         int
	SummarizeBytes   int
	HasContextPack   bool
	ContextPackBytes int
}

type Metric

type Metric struct {
	Bytes       int     `json:"bytes"`
	Tokens      int     `json:"tokens"`
	Ratio       float64 `json:"ratio"`
	SavedTokens int     `json:"saved_tokens"`
}

type Result

type Result struct {
	RawBytes    int     `json:"raw_bytes"`
	RawTokens   int     `json:"raw_tokens"`
	Summarize   Metric  `json:"summarize"`
	ContextPack *Metric `json:"context_pack,omitempty"`
}

func Build

func Build(in Input) Result

Jump to

Keyboard shortcuts

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