diff options
author | Aleksey Kladov <[email protected]> | 2021-01-21 16:04:50 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-21 16:30:52 +0000 |
commit | e5c5c0a040e0c74892ea0a36c7fd50e5410879bd (patch) | |
tree | 4da6406b6d85f884b5ee2c927b2c1126192a9159 /crates/profile/src/lib.rs | |
parent | 235583f3fc886bb839f34c4ff5713d101939d95c (diff) |
Include `countme` crate to count important data structures.
Diffstat (limited to 'crates/profile/src/lib.rs')
-rw-r--r-- | crates/profile/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
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::{ | |||
15 | stop_watch::{StopWatch, StopWatchSpan}, | 15 | stop_watch::{StopWatch, StopWatchSpan}, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | pub use countme; | ||
19 | /// Include `_c: Count<Self>` field in important structs to count them. | ||
20 | /// | ||
21 | /// To view the counts, run with `RA_COUNT=1`. The overhead of disabled count is | ||
22 | /// almost zero. | ||
23 | pub use countme::Count; | ||
24 | |||
18 | thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); | 25 | thread_local!(static IN_SCOPE: RefCell<bool> = RefCell::new(false)); |
19 | 26 | ||
20 | /// Allows to check if the current code is withing some dynamic scope, can be | 27 | /// Allows to check if the current code is withing some dynamic scope, can be |