MCPcopy Create free account
hub / github.com/AI45Lab/Code / gen_token_usage

Function gen_token_usage

core/tests/test_persisted_schema_roundtrip.rs:193–201  ·  view source on GitHub ↗
(rng: &mut Rng)

Source from the content-addressed store, hash-verified

191// ─────────────────────────────────────────────────────────────────────
192
193fn gen_token_usage(rng: &mut Rng) -> TokenUsage {
194 TokenUsage {
195 prompt_tokens: rng.usize_below(100_000),
196 completion_tokens: rng.usize_below(100_000),
197 total_tokens: rng.usize_below(200_000),
198 cache_read_tokens: rng.opt_usize(),
199 cache_write_tokens: rng.opt_usize(),
200 }
201}
202
203fn gen_image_source(rng: &mut Rng) -> ImageSource {
204 ImageSource {

Callers 3

gen_agent_eventFunction · 0.85
gen_loop_checkpointFunction · 0.85
gen_session_dataFunction · 0.85

Calls 2

usize_belowMethod · 0.80
opt_usizeMethod · 0.80

Tested by

no test coverage detected