From e5c5c0a040e0c74892ea0a36c7fd50e5410879bd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 21 Jan 2021 19:04:50 +0300 Subject: Include `countme` crate to count important data structures. --- crates/profile/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'crates/profile/src/lib.rs') diff --git a/crates/profile/src/lib.rs b/crates/profile/src/lib.rs index aa6ccc36c..79dba47d5 100644 --- a/crates/profile/src/lib.rs +++ b/crates/profile/src/lib.rs @@ -15,6 +15,13 @@ pub use crate::{ stop_watch::{StopWatch, StopWatchSpan}, }; +pub use countme; +/// Include `_c: Count` field in important structs to count them. +/// +/// To view the counts, run with `RA_COUNT=1`. The overhead of disabled count is +/// almost zero. +pub use countme::Count; + thread_local!(static IN_SCOPE: RefCell = RefCell::new(false)); /// Allows to check if the current code is withing some dynamic scope, can be -- cgit v1.2.3