MCPcopy Index your code
hub / github.com/RustPython/RustPython / update_stats

Method update_stats

crates/vm/src/gc_state.rs:107–120  ·  view source on GitHub ↗
(
        &self,
        collected: usize,
        uncollectable: usize,
        candidates: usize,
        duration: f64,
    )

Source from the content-addressed store, hash-verified

105 }
106
107 pub fn update_stats(
108 &self,
109 collected: usize,
110 uncollectable: usize,
111 candidates: usize,
112 duration: f64,
113 ) {
114 let mut guard = self.stats.lock();
115 guard.collections += 1;
116 guard.collected += collected;
117 guard.uncollectable += uncollectable;
118 guard.candidates += candidates;
119 guard.duration += duration;
120 }
121
122 /// Reset the stats mutex to unlocked state after fork().
123 ///

Callers 1

collect_innerMethod · 0.80

Calls 1

lockMethod · 0.45

Tested by

no test coverage detected