MCPcopy Create free account
hub / github.com/Cateds/opencode-stats / total

Method total

src/db/models.rs:17–22  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

15
16impl TokenUsage {
17 pub fn total(&self) -> u64 {
18 self.input
19 .saturating_add(self.output)
20 .saturating_add(self.cache_read)
21 .saturating_add(self.cache_write)
22 }
23
24 pub fn add_assign(&mut self, other: &TokenUsage) {
25 self.input = self.input.saturating_add(other.input);

Callers 7

resolved_stored_costFunction · 0.80
build_model_chartFunction · 0.80
build_provider_chartFunction · 0.80
build_chart_for_modelsFunction · 0.80
build_snapshotFunction · 0.80
build_heatmap_dataFunction · 0.80
parse_json_recordFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected