Skip to main content

get_token_usage

Function get_token_usage 

Source
pub async fn get_token_usage(
    store: &Option<Arc<TaskStore>>,
    repo: &str,
    task_id: &str,
) -> TokenUsage
Expand description

Get token usage from the store.

Returns TokenUsage::default() when the store is unavailable or the task is not found. DB read errors are logged as warnings and return the default.