-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
analysis-stats: emit lines of code and item tree counts for workspace; dependencies #19359
analysis-stats: emit lines of code and item tree counts for workspace; dependencies #19359
Conversation
We've had this since 2021 and I didn't know about it. |
"This" being |
That's what I wanted to ask (and the reason I looked at |
I mean, I think we should have this on by default. I'll do that right now, one second. |
How hard would it be to format 12345678 as 12_345_678? That makes it much easier to quickly see whether the amount is in the tens of thousands, hundreds of thousands or in the millions. |
1660c5f
to
ea5bf3a
Compare
A little fiddly if we don't want to take any dependencies. If we do take a dependency, a whole bunch of localization stuff is also (necessarily, IMO) pulled in. |
Wasn't too bad; just had to remember some interview questions. |
7dfff84
to
bd19cf3
Compare
I updated this PR to print additional statistics about the number of traits, macro calls, and impls in both dependencies and the workspace under "Source Stats". The formatting feels a little iffy:
Any suggestions for improvements? |
That logs the workspace item trees twice, it also logs some workspace stats twice now which disagree with each other 😅 |
The numbers under I'll redo how the output is rendered by creating dedicated "usages" and declarations" sections. I probably shouldn't be too attached to the output styling of |
da5d8f2
to
7d050fe
Compare
Updated the printing of |
Realized that we don't have a good measure for how many lines of code rust-analyzer is processing, so I decided to fix this. When
analysis-stats
is run, it'll now default to including a section titled "Source Stats" under "Database Loaded". See below for an example of me runninganalysis-stats
on Salsa: