Skip to content
1 viewer

rust 1,860,549 · typescript 235,540 · javascript 132,952 · python 20,426 · 6,408 files · digest f72e9ad3d771 · built in 1.3 s · crystals off

compute_cap_headroom

cre8_app_metering::preflight::compute_cap_headroom

fn · cre8-app-metering · crates/cre8-app-metering/src/preflight.rs:245 pub generic documented

51lines
7cyclomatic
2max nesting
23statements
1? exits
4params
14callers
7callees
2.2 (p95)call-graph weight

Crystal

no crystal was derived for this function

Call neighbourhood

Callers left, callees right, two hops each way (14 direct callers, 7 direct callees; the heaviest shown). Dashed edges are method calls resolved by name alone.

name · 1 sitepath · 1 sitepath · 1 sitename · 7 sitesname · 1 sitename · 1 sitename · 1 sitepath · 1 sitepath · 1 sitename · 1 sitename · 1 sitename · 1 sitename · 1 sitename · 2 sitesname · 1 sitename · 1 sitepath · 1 sitename · 2 sitesname · 1 sitename · 1 sitename · 1 sitename · 1 sitepath · 1 sitemethod · 1 sitemethod · 1 sitename · 1 sitename · 1 sitename · 1 sitemethod · 1 siteself · 1 sitemethod · 1 siteself · 1 siteself · 1 sitepath · 1 sitename · 1 sitemethod · 1 sitename · 1 sitemethod · 1 sitename · 1 sitemethod · 1 sitesettle_llm_spendapp-intelligence · cc 11cre8_app_intelligence::spend::settle_llm_spendpreflight_model_turn_spendapp-messaging · cc 1cre8_app_messaging::connection::preflight_model_turn_spendLocalSubstrateTransport::ch…app-agent · cc 1cre8_app_agent::driver::LocalSubstrateTransport::check_spend_capscap_preflight_refuses_befor…app-intelligence · cc 1cre8_app_intelligence::spend::tests::cap_preflight_refuses_before_the_provider_and_permits_an_ungoverned_assetpreflight_ignores_a_role_sc…app-intelligence · cc 1cre8_app_intelligence::spend::tests::preflight_ignores_a_role_scoped_cap_the_peer_does_not_holdhandle_metering_cap_headroomapp-metering · cc 1cre8_app_metering::connection::handle_metering_cap_headroomcheck_llm_spend_capsapp-intelligence · cc 6cre8_app_intelligence::spend::check_llm_spend_capscap_headroomapp-metering · cc 3cre8_app_metering::connection::cap_headroomspecific_contract_does_not_…app-metering · cc 1cre8_app_metering::preflight::tests::specific_contract_does_not_hide_parent_capunsupported_scoped_cap_is_r…app-metering · cc 1cre8_app_metering::preflight::tests::unsupported_scoped_cap_is_reported_not_hiddenheadroom_per_peer_matches_c…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_per_peer_matches_cap_minus_spentheadroom_per_peer_isolated_…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_per_peer_isolated_between_peersheadroom_global_shared_acro…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_global_shared_across_peersheadroom_per_role_reported_…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_per_role_reported_as_unsupportedheadroom_by_attribute_repor…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_by_attribute_reported_as_unsupportedper_role_cap_survives_serde…app-metering · cc 1cre8_app_metering::preflight::tests::per_role_cap_survives_serde_round_trip_via_storageheadroom_no_matching_rule_i…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_no_matching_rule_is_emptyheadroom_strictest_of_multi…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_strictest_of_multiple_rules_visibleheadroom_exhausted_returns_…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_exhausted_returns_zero_not_negativeheadroom_exactly_equals_cap…app-metering · cc 1cre8_app_metering::preflight::tests::headroom_exactly_equals_cap_is_zerocompute_cap_headroomapp-metering · cc 7cre8_app_metering::preflight::compute_cap_headroomManifoldRegistry::rebuild_f…app-manifold · cc 1cre8_app_manifold::contract_store::ManifoldRegistry::rebuild_fromAssetRef::matches_patternruntime-contracts · cc 1cre8_runtime_contracts::asset_ref::AssetRef::matches_patternManifoldRegistry::cap_rules…app-manifold · cc 1cre8_app_manifold::contract_store::ManifoldRegistry::cap_rules_for_assetcap_scope_labelapp-metering · cc 4cre8_app_metering::preflight::cap_scope_labelFlowHistory::sum_in_windowapp-manifold · cc 2cre8_app_manifold::rules::FlowHistory::sum_in_windowread_flow_historyapp-metering · cc 12cre8_app_metering::preflight::read_flow_historyunsupported_cap_headroom_en…app-metering · cc 1cre8_app_metering::preflight::unsupported_cap_headroom_entryHyperDbProtocolStore::graphapp-protocol · cc 1cre8_app_protocol::store_adapter::HyperDbProtocolStore::graphAssetRef::bind_patternruntime-contracts · cc 1cre8_runtime_contracts::asset_ref::AssetRef::bind_patternManifoldRegistry::emptyapp-manifold · cc 1cre8_app_manifold::contract_store::ManifoldRegistry::emptypattern_matchesruntime-app-types · cc 6cre8_runtime_app_types::listener_dispatch::pattern_matchesManifoldRegistry::force_reb…app-manifold · cc 2cre8_app_manifold::contract_store::ManifoldRegistry::force_rebuildManifoldRegistry::matching_…app-manifold · cc 1cre8_app_manifold::contract_store::ManifoldRegistry::matching_for_assetFlowHistory::newapp-manifold · cc 1cre8_app_manifold::rules::FlowHistory::newscope_key_matchesapp-metering · cc 6cre8_app_metering::preflight::scope_key_matches

Control flow

Source not readable from this process.

Callers 14

Callees 7

Source not readable from this process.