aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_prof/src
Commit message (Collapse)AuthorAgeFilesLines
* Add rustc-perf to metricsAleksey Kladov2020-07-251-0/+6
|
* Setup global allocator in the correct crateAleksey Kladov2020-07-221-4/+0
| | | | It worked before, but was roundabout
* Remove support for jemallocAleksey Kladov2020-07-222-14/+2
| | | | | We only used it for measuring memory usage, but now we can use glibc's allocator for that just fine
* Allow gathering memory stats on non-jemalloc LinuxJonas Schievink2020-07-211-10/+15
|
* Add opt-in mimalloc featureIvan Kozik2020-07-141-0/+4
|
* Profiling exampleAleksey Kladov2020-07-111-1/+6
|
* Profiling tweaksAleksey Kladov2020-07-111-0/+2
|
* Simplify profiler impl (bubble up Option and shorten codeveetaha2020-04-251-24/+21
|
* Extract messy tree handling out of profiling codeAleksey Kladov2020-04-253-150/+114
|
* SimplifyAleksey Kladov2020-04-251-20/+17
|
* Simplify hprofAleksey Kladov2020-04-251-85/+64
|
* Move hprof to a separate fileAleksey Kladov2020-04-252-393/+398
|
* minor clenupAleksey Kladov2020-04-251-11/+14
|
* Move timeit to stdxAleksey Kladov2020-04-101-15/+0
|
* Fix race in the testsAleksey Kladov2020-03-301-0/+8
|
* Allow specifying additional info on call to profileAleksey Kladov2020-03-061-19/+38
|
* Make backtrace optionalAleksey Kladov2020-02-191-0/+1
|
* Run cargo +nightly fix --clippy -Z unstable-optionsKirill Bulatov2020-02-181-1/+1
|
* Rename the binary to rust-analyzerAleksey Kladov2020-02-181-2/+2
|
* Replace ra_cli mentionsLaurențiu Nicola2020-02-171-2/+2
|
* Enable profiling for benchAleksey Kladov2020-02-161-0/+7
|
* Avoid premature pessimizationAleksey Kladov2020-02-021-32/+32
| | | | | | The extra allocation for message should not matter here at all, but using a static string is just as ergonomic, if not more, and there's no reason to write deliberately slow code
* Merge #2895bors[bot]2020-01-291-46/+71
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2895: Rewrite ra_prof's profile printing r=michalt a=michalt This changes the way we print things to first construct a mapping from events to the children and uses that mapping to actually print things. It should not change the actual output that we produce. The new approach two benefits: * It avoids a potential quadratic behavior of the previous approach. For instance, for a vector of N elements: ``` [Message{level: (N - 1)}, ..., Message{level: 1}, Message{level: 0}] ``` we would first do a linear scan to find entry with level 0, then another scan to find one with level 1, etc. * It makes it much easier to improve the output in the future, because we now pre-compute the children for each entry and can easily take that into account when printing. Signed-off-by: Michal Terepeta <[email protected]> Co-authored-by: Michal Terepeta <[email protected]>
| * A couple of small improvements to ra_prof printingMichal Terepeta2020-01-291-3/+3
| | | | | | | | | | | | Based on suggestions from @matklad. Signed-off-by: Michal Terepeta <[email protected]>
| * Rewrite ra_prof's profile printingMichal Terepeta2020-01-221-46/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the way we print things to first construct a mapping from events to the children and uses that mapping to actually print things. It should not change the actual output that we produce. The new approach two benefits: * It avoids a potential quadratic behavior of the previous approach. For instance, for a vector of N elements: ``` [Message{level: (N - 1)}, ..., Message{level: 1}, Message{level: 0}] ``` we would first do a linear scan to find entry with level 0, then another scan to find one with level 1, etc. * It makes it much easier to improve the output in the future, because we now pre-compute the children for each entry and can easily take that into account when printing. Signed-off-by: Michal Terepeta <[email protected]>
* | Add print_time helperAleksey Kladov2020-01-251-0/+15
|/
* Fix a corner case when printing unaccounted timeMichal Terepeta2020-01-191-4/+52
| | | | | | | | | | | | | | | | | | | | | | 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 <[email protected]>
* Improve profiling output when duration filter is specifiedMichal Terepeta2020-01-021-4/+25
| | | | | | | | | | | | | | | 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 <[email protected]>
* More compact profiling displayAleksey Kladov2019-12-221-4/+4
|
* Even if jemalloc feature is used do not use it on msvckjeremy2019-11-142-3/+3
| | | | Fixes #2233
* show unaccounted for time in profilingAleksey Kladov2019-10-241-3/+20
|
* Added test for check doc strings in crates.Alexander Andreev2019-09-302-0/+4
| | | | #1856
* Remove cpuprofile dependenciesAleksey Kladov2019-08-172-10/+61
|
* jemallocator 0.3Jeremy A. Kolb2019-07-171-3/+3
|
* Added extract path attribute for current moduleAlexander Andreev2019-07-061-1/+1
| | | | #1211
* allow rustfmt to reorder importsAleksey Kladov2019-07-041-6/+9
| | | | | | 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
* print memory usage for queriesAleksey Kladov2019-06-301-9/+18
|
* Move memory usage statistics to ra_profAleksey Kladov2019-06-302-0/+66
|
* add cpuprofile to ra_profAleksey Kladov2019-06-261-0/+33
| | | | | | | | | 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!
* fix debug scopesAleksey Kladov2019-06-041-4/+4
|
* add couple of debug utilsAleksey Kladov2019-06-031-0/+30
|
* apply profile filter to top-level entries onlyAleksey Kladov2019-06-011-7/+6
|
* better profiligAleksey Kladov2019-05-211-8/+27
|
* profile type inferenceAleksey Kladov2019-05-211-0/+1
|
* switch to once_cell from lazy_staticAleksey Kladov2019-05-071-14/+13
|
* Simplifykjeremy2019-04-261-7/+4
|
* Pass in char instead of single-char stringkjeremy2019-04-261-3/+3
|
* fix testAleksey Kladov2019-04-141-17/+6
|
* more intuitive nameAleksey Kladov2019-04-141-11/+15
|
* filter by timeAleksey Kladov2019-04-141-5/+35
|