Mercurial > public > mercurial-scm > hg
diff rust/hg-core/src/dirstate/parsers.rs @ 44541:d880805d5442
hg-core: add function timing information
This change makes use of the newly added logging infrastructure to trace the
execution time of some important calls.
This approach is very much complementary to using a profiler and will not
guard against out-of-order execution or other kinds of compiler optimizations.
That said, it is useful to get a rough high-level idea of where time is spent.
Differential Revision: https://phab.mercurial-scm.org/D8253
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Fri, 06 Mar 2020 18:08:23 +0100 |
parents | 5ac243a92e37 |
children | 26114bd6ec60 |
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/parsers.rs Fri Mar 06 18:08:13 2020 +0100 +++ b/rust/hg-core/src/dirstate/parsers.rs Fri Mar 06 18:08:23 2020 +0100 @@ -9,6 +9,7 @@ DirstateEntry, DirstatePackError, DirstateParents, DirstateParseError, }; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use micro_timer::timed; use std::convert::{TryFrom, TryInto}; use std::io::Cursor; use std::time::Duration; @@ -20,6 +21,7 @@ // TODO parse/pack: is mutate-on-loop better for performance? +#[timed] pub fn parse_dirstate( state_map: &mut StateMap, copy_map: &mut CopyMap,