Mercurial > hg
comparison rust/hg-core/src/lib.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 | c8891bca40fb |
children | ece43c79333e |
comparison
equal
deleted
inserted
replaced
44540:82f51ab7a2dd | 44541:d880805d5442 |
---|---|
32 parse_pattern_syntax, read_pattern_file, IgnorePattern, | 32 parse_pattern_syntax, read_pattern_file, IgnorePattern, |
33 PatternFileWarning, PatternSyntax, | 33 PatternFileWarning, PatternSyntax, |
34 }; | 34 }; |
35 use std::collections::HashMap; | 35 use std::collections::HashMap; |
36 use twox_hash::RandomXxHashBuilder64; | 36 use twox_hash::RandomXxHashBuilder64; |
37 | |
38 /// This is a contract between the `micro-timer` crate and us, to expose | |
39 /// the `log` crate as `crate::log`. | |
40 use log; | |
37 | 41 |
38 pub type LineNumber = usize; | 42 pub type LineNumber = usize; |
39 | 43 |
40 /// Rust's default hasher is too slow because it tries to prevent collision | 44 /// Rust's default hasher is too slow because it tries to prevent collision |
41 /// attacks. We are not concerned about those: if an ill-minded person has | 45 /// attacks. We are not concerned about those: if an ill-minded person has |