about summary refs log tree commit diff
path: root/crates/rust-analyzer/src/cli/analysis_stats.rs
AgeCommit message (Collapse)AuthorLines
2022-02-25Add CSV output to analysis-statsFlorian Diebold-5/+48
For easy diffing.
2021-09-26Begining of lsifhamidreza kalbasi-2/+0
2021-08-31internal: split database loading time in anaysis-stats into componentsAleksey Kladov-7/+29
2021-08-10Update crates/rust-analyzer/src/cli/analysis_stats.rsAleksey Kladov-1/+1
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2021-08-10internal: print total size of source code in analysis-statsAleksey Kladov-4/+25
2021-08-10internal: unify subcommand handling between ra and xtaskAleksey Kladov-17/+4
2021-07-18internal: simplify handling of the build scriptsAleksey Kladov-1/+0
2021-06-11Only prefill caches in the completion benchmarkKirill Bulatov-0/+1
2021-06-05Enable proc macros and build scripts by default in CLILaurențiu Nicola-4/+4
2021-05-27Display unknown types in analysis-statsLaurențiu Nicola-34/+53
2021-04-12feat: avoid checking the whole project during initial loadingAleksey Kladov-0/+1
2021-04-06Move Ty accessors to TyExtLukas Wirth-1/+1
2021-04-05analysis-stats: allow skipping type inferenceJonas Schievink-22/+38
This removes "noise" from memory profiles since it avoids lowering function bodies and types
2021-03-14Add no-sysroot flag for analysis-statsEdwin Cheng-1/+4
2021-03-13Separate `Ty` and `TyKind` like in ChalkFlorian Diebold-3/+3
Currently `Ty` just wraps `TyKind`, but this allows us to change most places to already use `intern` / `interned`.
2021-03-02Fix ProcMacroClient dropped too early in cliEdwin Cheng-1/+1
2021-02-16Merge #7690bors[bot]-3/+4
7690: Extract `fn load_workspace(…)` from `fn load_cargo(…)` r=matklad a=regexident Unfortunately in https://github.com/rust-analyzer/rust-analyzer/pull/7595 I forgot to `pub use` (rather than just `use`) the newly introduced `LoadCargoConfig`. So this PR fixes this now. It also: - splits up `fn load_cargo` into a "workspace loading" and a "project loading" phase - adds a `progress: &dyn Fn(String)` to allow third-parties to provide CLI progress updates, too The motivation behind both of these is the fact that rust-analyzer currently does not support caching. As such any third-party making use of `ra_ap_…` needs to providing a caching layer itself. Unlike for rust-analyzer itself however a common use-pattern of third-parties is to analyze a specific target (`--lib`/`--bin <BIN>`/…) from a specific package (`--package`). The targets/packages of a crate can be obtained via `ProjectWorkspace::load(…)`, which currently is performed inside of `fn load_cargo`, effectively making the returned `ProjectWorkspace` inaccessible to the outer caller. With this information one can then provide early error handling via CLI (in case of ambiguities or invalid arguments, etc), instead of `fn load_cargo` failing with a possibly obscure error message. It also allows for annotating the persisted caches with its specific associated package/target selector and short-circuit quickly if a matching cache is found on disk, significantly cutting load times. Before: ```rust pub struct LoadCargoConfig { pub cargo_config: &CargoConfig, pub load_out_dirs_from_check: bool, pub with_proc_macro: bool, } pub fn load_cargo( root: &Path, config: &LoadCargoConfig ) -> Result<(AnalysisHost, vfs::Vfs)> { // ... } ``` After: ```rust pub fn load_workspace( root: &Path, config: &CargoConfig, progress: &dyn Fn(String), ) -> Result<ProjectWorkspace> { // ... } pub struct LoadCargoConfig { pub load_out_dirs_from_check: bool, pub with_proc_macro: bool, } pub fn load_cargo( ws: ProjectWorkspace, config: &LoadCargoConfig, progress: &dyn Fn(String), ) -> Result<(AnalysisHost, vfs::Vfs)> { // ... } ``` Co-authored-by: Vincent Esche <regexident@gmail.com>
2021-02-16Prepare for utf-8 offsetsAleksey Kladov-4/+4
2021-02-16Split `pub fn cargo_load` into `pub fn load_workspace_at` and `pub fn ↵Vincent Esche-3/+4
load_workspace`
2021-02-08Consolidate `fn load_cargo(…)` parameters into `struct LoadCargoConfig ↵Vincent Esche-8/+10
{ … }`
2021-02-08Add `config: &CargoConfig` parameter to `fn load_cargo(…)`Vincent Esche-1/+6
2021-01-21Include `countme` crate to count important data structures.Aleksey Kladov-0/+5
2021-01-11Improve analysis stats legibilityAleksey Kladov-20/+17
2021-01-10Make default memory stats less verboseAleksey Kladov-1/+1
2021-01-02Only log path and syntax range when processing function if source existsNick Spain-6/+6
2021-01-02Mark HasSource::source_old as deprecated but allow at all call sitesNick Spain-0/+1
2021-01-02HasSource::source -> HasSource::source_oldNick Spain-1/+1
To start migrating HasSource::source to return an Option.
2020-12-11Move print_memory_usage to cli.rsJonas Schievink-5/+3
2020-12-08Make `original_range` a method on `InFile<&SyntaxNode>`Jonas Schievink-2/+2
2020-10-24Re-export base_db from ide_dbIgor Aleksanov-4/+4
2020-08-13Rename ra_db -> base_dbAleksey Kladov-4/+4
2020-08-12Rename ra_syntax -> syntaxAleksey Kladov-1/+1
2020-08-12Rename ra_prof -> profileAleksey Kladov-1/+1
2020-08-09Remove Option<...> from result of Crate::root_modulePaul Daniel Faria-1/+1
There doesn't seem to be any need for it, and removing it simplies several paths of code that depend on it.
2020-07-30Use CmdArgs pattern for bench & analysis statsAleksey Kladov-222/+229
2020-07-30Code shuffle resilientlyAleksey Kladov-3/+8
2020-07-30Rename metricAleksey Kladov-1/+1
2020-07-30Do not show progress with parallel analysisAleksey Kladov-0/+1
2020-07-30Report instructions in addition to timeAleksey Kladov-20/+20
They hopefully will be more stable on CI
2020-07-30Allow negative bytesAleksey Kladov-11/+3
Gotta be optimistic about those memory usage optimizations
2020-07-29Update crates/rust-analyzer/src/cli/analysis_stats.rsAleksey Kladov-1/+1
Co-authored-by: Laurențiu Nicola <lnicola@users.noreply.github.com>
2020-07-29Replace rand with oorandomAleksey Kladov-5/+20
2020-07-26Report type errors in metricsAleksey Kladov-0/+4
2020-07-25Add rustc-perf to metricsAleksey Kladov-19/+40
2020-07-15Add --memory-usage to analysis-benchJonas Schievink-18/+6
2020-07-03Track VFS and remaining/unaccounted memoryJonas Schievink-4/+14
2020-06-30analysis-stats: allow parallel type inferenceJonas Schievink-2/+29
2020-06-29Use more of FxHash*Laurențiu Nicola-4/+6
2020-06-24Make Debug less verbose for VfsPath and use Display in analysis-statsLaurențiu Nicola-1/+1
2020-06-23New VFSAleksey Kladov-17/+8