pub fn all_stats() -> RHash
Expand description
Returns all possible key/value pairs for stat
as a Ruby Hash.
§Panics
Panics if called from a non-Ruby thread. See Ruby::gc_all_stats
for the
non-panicking version.
§Examples
use magnus::{gc, Symbol};
let stats = gc::all_stats();
let live_slots: usize = stats.fetch(Symbol::new("heap_live_slots")).unwrap();
assert!(live_slots > 1);