Skip to content
1 viewer

rust 1,847,280 · typescript 232,434 · javascript 131,101 · python 19,227 · 6,362 files · digest 755e2ee30522 · built in 2.3 s · crystals off

cre8-util-quota crates cargo crate

Quota / capacity abstraction over LLM providers — RateLimitHeaders parser, CallObservation, QuotaSource trait, CapacityView, LatencyClock. Second crate in the cre8-util-* tier (after cre8-util-dsp).

crates/cre8-util-quota · level 0 · 367 lines (237 code) · 1 files · 22 fns (9 tests) · cyclomatic Σ 28

0workspace deps
5direct dependents
99transitive dependents
0calls out
5calls in
20.5call-graph weight
0.0%exact crystals

Neighbourhood

Left: crates that declare this one. Right: crates it declares (dev-dependencies included). Edge width grows with resolved calls.

Files

lowhigh

Heaviest functions

By call-graph weight (PageRank; 1.0 is the average function). 22 functions in all.

functionkindlinescyclomaticcallerscalleesweightcrystal
RateLimitHeaders::from_header_lookupsrc/lib.rs:93method81722.3
positive_duration_secssrc/lib.rs:119fn32102.3
parse_duration_reset_secssrc/lib.rs:111fn72112.1
parse_rate_limit_reset_secssrc/lib.rs:107fn31211.9
parse_rate_limit_u32src/lib.rs:103fn31101.5
TestQuotaSource::namesrc/lib.rs:318trait impl31101
ResetDurationAccumulator::current_valuesrc/lib.rs:144method31100.8
duration_unit_secondssrc/lib.rs:153fn73100.8
ResetDurationAccumulator::flush_unitsrc/lib.rs:138method51120.7
is_duration_number_charsrc/lib.rs:149fn32100.7
LatencyClock::startsrc/lib.rs:237method31200.6
snapshotsrc/lib.rs:228fn31110.6
LatencyClock::elapsed_mssrc/lib.rs:240method31100.6
TestQuotaSource::reportsrc/lib.rs:322trait impl101100.6
ResetDurationAccumulator::pushsrc/lib.rs:130method72020.5
parse_rate_limit_headers_from_groq_style_lookupsrc/lib.rs:251fn121010.5
missing_headers_yield_none_fieldssrc/lib.rs:265fn71010.5
numeric_and_malformed_rate_limit_headers_are_leniently_parsedsrc/lib.rs:274fn141010.5
reset_seconds_parser_handles_fractional_units_and_ignores_unknown_unitssrc/lib.rs:290fn51010.5
capacity_view_serializes_with_kind_tagsrc/lib.rs:297fn171000.5
TestQuotaSource::capacitysrc/lib.rs:333trait impl31000.5
snapshot_reports_trait_sources_and_latency_clock_tickssrc/lib.rs:339fn281040.5

Outside the workspace

serde serde_json