Commit Graph
2 Commits
Author SHA1 Message Date
Chandler Carruth 0e8e94d8bf Expand source stats to roughly cover more tokens. (#3277)
This is pretty rough both in code-quality and what it tries to cover.
The coverage approximation is probably fine as it mostly just gives some
vague idea of the distributions we should aim at when evaluating
performance. We still want performance with unusual distributions to be
good.

Happy to improve the code quality if folks want, and especially with
suggestions on what would help. For this kind of quick scripting, it
seemed "fine" to me.
2023-10-11 00:50:00 +00:00
Chandler Carruth 2de7d262b4 Add a script to scan source code for basic stats. (#3150)
This is a rough script that uses regexes to do a simple scan of source
code and extract some basic source code statistics. Things like column
width, comment line density, identifier lengths and densities.

After scanning, it prints out both raw stats and in a few cases renders
a quick histogram to the terminal to help visualize a relevant
distribution.

I threw this together pretty quickly, and this is an area of Python I
have very limited familiarity with, so happy to have any suggestions for
how to better approach this.
2023-08-25 22:41:12 +00:00