MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / push_history

Function push_history

atomic-cli/src/commands/git/rolling_dashboard.rs:107–112  ·  view source on GitHub ↗
(history: &mut VecDeque<u64>, value: u64)

Source from the content-addressed store, hash-verified

105}
106
107fn push_history(history: &mut VecDeque<u64>, value: u64) {
108 if history.len() == HISTORY_SAMPLES {
109 history.pop_front();
110 }
111 history.push_back(value);
112}
113
114fn cpu_label(cpu: Option<f64>) -> String {
115 cpu.map(|value| format!("{value:.1}% (100% = one core)"))

Callers 1

observeMethod · 0.85

Calls 1

lenMethod · 0.45

Tested by

no test coverage detected