pub fn extract_budgets(value: &Value) -> Vec<(u64, u64)>Expand description
Extracts CPU and memory budgets from a JSON value.
This function parses a JSON structure to extract CPU and memory usage budgets
from an array located under the "result" key. Each item in the array is expected
to have a "budget" object containing "cpu" and "memory" fields.
§Arguments
value- A reference to aserde_json::Valuecontaining the JSON data.
§Returns
Vec<(u64, u64)>- A vector of tuples, where each tuple contains:u64- CPU budget.u64- Memory budget.