anthropics/anthropic-sdk-ruby
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 3,454 files with 186,634 lines of code.
- 1 very long files (1,771 lines of code)
- 5 long files (3,084 lines of code)
- 100 medium size files (28,432 lines of code)
- 346 small files (48,702 lines of code)
- 3,002 very small files (104,645 lines of code)
Legend:
1001+
501-1000
201-500
101-200
1-100
explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
File Size per Logical Decomposition
primary
Longest Files (Top 50)
| File | # lines | # units |
|---|---|---|
| 1771 | - | |
| 799 | 11 | |
| 651 | 7 | |
| 601 | 6 | |
| 518 | 5 | |
| 515 | 8 | |
| 488 | 7 | |
| 488 | 7 | |
| 478 | 28 | |
| 464 | 2 | |
| 448 | 9 | |
| 440 | 3 | |
| 440 | 3 | |
| 418 | 3 | |
| 410 | 10 | |
| 396 | 4 | |
| 391 | 9 | |
| 382 | 5 | |
| 374 | 11 | |
| 372 | 5 | |
| 353 | 7 | |
| 352 | 11 | |
| 351 | - | |
| 350 | 6 | |
| 350 | 3 | |
| 349 | 10 | |
| 347 | 5 | |
| 347 | 9 | |
| 347 | 6 | |
| 346 | 2 | |
| 346 | - | |
| 340 | 6 | |
| 336 | 9 | |
| 332 | 5 | |
| 324 | 11 | |
| 323 | 12 | |
| 322 | 3 | |
| 322 | 9 | |
| 319 | 8 | |
| 315 | 6 | |
| 308 | 9 | |
| 303 | 3 | |
| 297 | 9 | |
| 294 | 21 | |
| 291 | 6 | |
| 287 | 8 | |
| 287 | 17 | |
| 285 | 14 | |
| 284 | 2 | |
| 275 | 21 |
Large Files That Change Often (Top 20)
To change a file, an AI coding agent (or a person) has to read it: these files are read the most for the changes in the past year (lines × changes).
| File | # lines | ≈ tokens to read | # changes (1y) | ≈ lines edited per change | lines read per line changed |
|---|---|---|---|---|---|
| 1771 | ~10k–30k | 96 | ~20 | ~100 | |
| 799 | ~5k–15k | 35 | ~50 | ~15 | |
| 651 | ~3k–10k | 34 | ~50 | ~15 | |
| 601 | ~3k–10k | 35 | ~70 | ~10 | |
| 518 | ~3k–10k | 28 | ~50 | ~10 | |
| 515 | ~3k–10k | 25 | ~50 | ~10 | |
| 440 | ~3k–7k | 23 | ~30 | ~15 | |
| 440 | ~3k–7k | 22 | ~30 | ~15 | |
| 418 | ~2k–7k | 22 | ~30 | ~15 | |
| 396 | ~2k–7k | 23 | ~50 | ~10 | |
| 347 | ~2k–5k | 24 | ~50 | ~7 | |
| 351 | ~2k–5k | 22 | ~20 | ~15 | |
| 346 | ~2k–5k | 22 | ~20 | ~15 | |
| 391 | ~2k–7k | 19 | ~30 | ~10 | |
| 219 | ~1.5k–5k | 33 | ~7 | ~30 | |
| 350 | ~2k–5k | 20 | ~30 | ~10 | |
| 347 | ~2k–5k | 19 | ~30 | ~10 | |
| 350 | ~2k–5k | 18 | ~20 | ~20 | |
| 349 | ~2k–5k | 18 | ~70 | ~5 | |
| 303 | ~2k–5k | 20 | ~30 | ~7 |
Tokens are lines × 7 to 14 (analysis.fileReadsForChanges). Lines edited per change are the file's lines added and deleted divided by its commits over the whole history. Agents read about 2,000 lines at a time: when a 17,000-line file was split into modules, the tokens an agent read for the same change fell by 83% (The Economic Benefit of Refactoring, 2026).
Files With Most Units (Top 50)
| File | # lines | # units |
|---|---|---|
| 215 | 33 | |
| 478 | 28 | |
| 229 | 24 | |
| 294 | 21 | |
| 275 | 21 | |
| 287 | 17 | |
| 117 | 14 | |
| 168 | 14 | |
| 285 | 14 | |
| 323 | 12 | |
| 374 | 11 | |
| 799 | 11 | |
| 352 | 11 | |
| 324 | 11 | |
| 410 | 10 | |
| 349 | 10 | |
| 90 | 10 | |
| 187 | 9 | |
| 232 | 9 | |
| 171 | 9 | |
| 308 | 9 | |
| 79 | 9 | |
| 79 | 9 | |
| 166 | 9 | |
| 247 | 9 | |
| 297 | 9 | |
| 347 | 9 | |
| 322 | 9 | |
| 336 | 9 | |
| 391 | 9 | |
| 66 | 9 | |
| 130 | 9 | |
| 110 | 9 | |
| 448 | 9 | |
| 87 | 9 | |
| 171 | 8 | |
| 52 | 8 | |
| 95 | 8 | |
| 225 | 8 | |
| 274 | 8 | |
| 287 | 8 | |
| 319 | 8 | |
| 231 | 8 | |
| 515 | 8 | |
| 114 | 8 | |
| 174 | 8 | |
| 122 | 8 | |
| 111 | 7 | |
| 115 | 7 | |
| 117 | 7 |
Files With Long Lines (Top 50)
There are 129 files with lines longer than 120 characters. In total, there are 245 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 287 | 8 | 13 | |
| 191 | 6 | 8 | |
| 120 | 3 | 7 | |
| 212 | 6 | 6 | |
| 66 | 3 | 6 | |
| 97 | - | 6 | |
| 97 | - | 6 | |
| 78 | - | 6 | |
| 80 | - | 6 | |
| 274 | 8 | 5 | |
| 130 | 5 | 5 | |
| 112 | 3 | 5 | |
| 163 | 6 | 5 | |
| 204 | 6 | 5 | |
| 229 | 6 | 5 | |
| 158 | 6 | 4 | |
| 127 | 5 | 4 | |
| 137 | 5 | 4 | |
| 132 | 5 | 4 | |
| 165 | 4 | 4 | |
| 168 | 6 | 3 | |
| 264 | 4 | 3 | |
| 186 | - | 3 | |
| 168 | 7 | 2 | |
| 68 | 2 | 2 | |
| 21 | - | 2 | |
| 29 | - | 2 | |
| 26 | - | 2 | |
| 28 | - | 2 | |
| 16 | - | 2 | |
| 28 | - | 2 | |
| 25 | - | 2 | |
| 25 | - | 2 | |
| 25 | - | 2 | |
| 72 | 2 | 2 | |
| 34 | - | 2 | |
| 349 | 10 | 2 | |
| 74 | 1 | 2 | |
| 139 | 3 | 2 | |
| 83 | 4 | 1 | |
| 204 | 5 | 1 | |
| 127 | 5 | 1 | |
| 158 | 6 | 1 | |
| 149 | 5 | 1 | |
| 131 | 5 | 1 | |
| 1771 | - | 1 | |
| 19 | 1 | 1 | |
| 23 | 3 | 1 | |
| 448 | 9 | 1 | |
| 47 | 5 | 1 |
Correlations
File Size vs. Commits (all time): 3454 points
|
|
1771.0 | lines of code min: 1.0average: 54.03 25th percentile: 15.0 median: 35.0 75th percentile: 67.0 max: 1771.0 |
|
| 0 | 255.0 | ||
|
commits (all time) min: 1.0 | average: 5.03 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 6.0 | max: 255.0
|
|||
File Size vs. Contributors (all time): 3454 points
|
|
1771.0 | lines of code min: 1.0average: 54.03 25th percentile: 15.0 median: 35.0 75th percentile: 67.0 max: 1771.0 |
|
| 0 | 20.0 | ||
|
contributors (all time) min: 1.0 | average: 2.25 | 25th percentile: 1.0 | median: 2.0 | 75th percentile: 3.0 | max: 20.0
|
|||
File Size vs. Commits (30 days): 1832 points
|
|
1771.0 | lines of code min: 1.0average: 68.81 25th percentile: 18.0 median: 44.0 75th percentile: 83.75 max: 1771.0 |
|
| 0 | 33.0 | ||
|
commits (30d) min: 1.0 | average: 3.11 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 4.0 | max: 33.0
|
|||
File Size vs. Contributors (30 days): 1832 points
|
|
1771.0 | lines of code min: 1.0average: 68.81 25th percentile: 18.0 median: 44.0 75th percentile: 83.75 max: 1771.0 |
|
| 0 | 8.0 | ||
|
contributors (30d) min: 1.0 | average: 2.29 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 2.0 | max: 8.0
|
|||
File Size vs. Commits (90 days): 2442 points
|
|
1771.0 | lines of code min: 1.0average: 60.38 25th percentile: 16.0 median: 39.0 75th percentile: 73.0 max: 1771.0 |
|
| 0 | 56.0 | ||
|
commits (90d) min: 1.0 | average: 3.55 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 5.0 | max: 56.0
|
|||
File Size vs. Contributors (90 days): 2442 points
|
|
1771.0 | lines of code min: 1.0average: 60.38 25th percentile: 16.0 median: 39.0 75th percentile: 73.0 max: 1771.0 |
|
| 0 | 9.0 | ||
|
contributors (90d) min: 1.0 | average: 2.32 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 3.0 | max: 9.0
|
|||
About This Analysis
- File size measurements show the distribution of size of files.
- Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
- It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
- To learn more about bloaters and how to deal with long code structures, Sokrates recommends the following resources:
- Refactoring bloaters, sourcemaking.com
- The Blob Software Development Anti-Pattern, sourcemaking.com