Commit graph

34 commits

Author SHA1 Message Date
Aleksey Kladov
6577a7622d Add print_time helper 2020-01-25 11:59:11 +01:00
Michal Terepeta
e8acf49088 Fix a corner case when printing unaccounted time
Previously `ra_prof` wouldn't actually print the unaccounted time in
some cases.

We would print, for instance, this:
```
    5ms - foo
        2ms - bar
```
instead of:
```
    5ms - foo
        2ms - bar
        3ms - ???
```

The fix is to properly handle the case when an entry has 0 children
instead of using the `last` variable.

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-19 18:34:40 +01:00
Michal Terepeta
bc91120b7c Improve profiling output when duration filter is specified
In particular:

  - Use strict inequality for comparisons, since that's what the filter
    syntax supports.

  - Convert to millis for comparisons, since that's the unit used both
    for the filter and when printing.

Now something like `RA_PROFILE='*>0'` will only print things that took
at least 1ms (when rounded to millis).

Signed-off-by: Michal Terepeta <michal.terepeta@gmail.com>
2020-01-02 17:26:02 +01:00
Aleksey Kladov
08df355375 More compact profiling display 2019-12-22 14:17:31 +01:00
Aleksey Kladov
7e2f4b30db Disable doctests 2019-11-17 18:35:05 +03:00
kjeremy
50825a41d8 Renormalize line endings 2019-11-14 19:44:37 -05:00
kjeremy
fc9c2915c7 Even if jemalloc feature is used do not use it on msvc
Fixes #2233
2019-11-14 11:47:18 -05:00
Aleksey Kladov
baa968e71c show unaccounted for time in profiling 2019-10-24 09:14:33 +03:00
Alexander Andreev
fdbd6bb11a Added test for check doc strings in crates.
#1856
2019-09-30 11:58:53 +03:00
Aleksey Kladov
4b6bccb58c ⬆️ once_cell 2019-09-01 23:18:15 +03:00
Aleksey Kladov
e751e4d8a3 Remove cpuprofile dependencies 2019-08-17 15:29:57 +03:00
Jeremy A. Kolb
5e9198f809 jemallocator 0.3 2019-07-17 10:58:17 -04:00
Alexander Andreev
35a0f04128 Added extract path attribute for current module
#1211
2019-07-06 14:04:56 +03:00
Aleksey Kladov
1834bae5b8 allow rustfmt to reorder imports
This wasn't a right decision in the first place, the feature flag was
broken in the last rustfmt release, and syntax highlighting of imports
is more important anyway
2019-07-04 23:09:09 +03:00
Aleksey Kladov
d70520eb38 print memory usage for queries 2019-06-30 14:49:45 +03:00
Aleksey Kladov
18a1e092e9 Move memory usage statistics to ra_prof 2019-06-30 13:30:17 +03:00
Aleksey Kladov
d621533f15 add cpuprofile to ra_prof
Now, one can use `let _p = ra_prof::cpu_profiler()` to capture profile
of a block of code.

This is not an out of the box experience, as that relies on gperfools

See the docs on https://github.com/AtheMathmo/cpuprofiler for more!
2019-06-26 11:11:28 +03:00
Aleksey Kladov
d2b23599b6 fix debug scopes 2019-06-04 14:46:22 +03:00
Aleksey Kladov
5264711b5d add couple of debug utils 2019-06-04 00:27:49 +03:00
Aleksey Kladov
4dd7faed34 apply profile filter to top-level entries only 2019-06-01 10:41:47 +03:00
Aleksey Kladov
6fed943bd2 better profilig 2019-05-22 00:00:58 +03:00
Aleksey Kladov
f63be06002 profile type inference 2019-05-21 16:26:13 +03:00
Aleksey Kladov
1667b5cf52 switch to once_cell from lazy_static 2019-05-07 20:54:33 +03:00
kjeremy
d8649c1af8 Simplify 2019-04-26 11:42:56 -04:00
kjeremy
47f10fce8a Pass in char instead of single-char string 2019-04-26 11:41:58 -04:00
Aleksey Kladov
247ac265f1 fix test 2019-04-15 01:17:26 +03:00
Aleksey Kladov
06615bd331 more intuitive name 2019-04-15 01:10:07 +03:00
Aleksey Kladov
5b7012318c filter by time 2019-04-15 01:10:07 +03:00
Aleksey Kladov
b228947b68 cleanup syntax 2019-04-15 01:10:07 +03:00
Aleksey Kladov
e6f32c6d3a fast path for disabled profiler 2019-04-15 01:10:07 +03:00
Sergey Parilin
cc2212f3cb added some docs to public functions 2019-04-03 16:05:55 +03:00
Sergey Parilin
9b73f80959 PR issuse resolved 2019-04-02 17:52:04 +03:00
Sergey Parilin
ef02c3c038 some PR issues fixed 2019-03-29 15:34:05 +03:00
Sergey Parilin
58224bc659 profiling crate first draft 2019-03-27 18:23:26 +03:00