openai/openai-guardrails-python
File Size The distribution of size of files (measured in lines of code). |
File Size Overall
- There are 66 files with 10,577 lines of code.
- 2 very long files (2,627 lines of code)
- 4 long files (2,331 lines of code)
- 11 medium size files (3,080 lines of code)
- 8 small files (1,052 lines of code)
- 41 very small files (1,487 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 |
|---|---|---|
| 1338 | 45 | |
| 1289 | 28 | |
| 650 | 31 | |
| 627 | 11 | |
| 551 | 27 | |
| 503 | 16 | |
| 427 | 13 | |
| 413 | 14 | |
| 333 | 9 | |
| 279 | 7 | |
| 265 | 26 | |
| 265 | 5 | |
| 252 | 9 | |
| 219 | 13 | |
| 212 | 10 | |
| 208 | 6 | |
| 207 | 10 | |
| 154 | 9 | |
| 149 | 7 | |
| 147 | 9 | |
| 140 | - | |
| 140 | 7 | |
| 119 | 7 | |
| 102 | 1 | |
| 101 | 2 | |
| 100 | 8 | |
| 93 | - | |
| 93 | 9 | |
| 92 | 7 | |
| 87 | 4 | |
| 73 | - | |
| 72 | 3 | |
| 62 | 3 | |
| 56 | - | |
| 55 | 2 | |
| 53 | 2 | |
| 51 | 4 | |
| 51 | 2 | |
| 42 | - | |
| 41 | 2 | |
| 40 | 2 | |
| 38 | - | |
| 38 | 2 | |
| 34 | 1 | |
| 32 | 1 | |
| 29 | - | |
| 27 | - | |
| 27 | 5 | |
| 26 | - | |
| 24 | - |
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 |
|---|---|---|---|---|---|
| 1338 | ~7k–20k | 10 | ~200 | ~7 | |
| 413 | ~2k–7k | 10 | ~150 | ~3 | |
| 503 | ~3k–10k | 8 | ~100 | ~5 | |
| 333 | ~2k–5k | 12 | ~70 | ~5 | |
| 551 | ~3k–10k | 7 | ~200 | ~3 | |
| 427 | ~2k–7k | 9 | ~100 | ~3 | |
| 627 | ~3k–10k | 6 | ~200 | ~3 | |
| 208 | ~1k–3k | 14 | ~70 | ~3 | |
| 265 | ~1.5k–5k | 9 | ~100 | ~3 | |
| 279 | ~1.5k–5k | 7 | ~70 | ~3 | |
| 265 | ~1.5k–5k | 5 | ~100 | ~3 | |
| 1289 | ~7k–20k | 1 | ~1,500 | ~1 | |
| 140 | ~700–2k | 8 | ~50 | ~3 | |
| 207 | ~1k–3k | 4 | ~150 | ~2 | |
| 140 | ~700–2k | 5 | ~50 | ~3 | |
| 650 | ~3k–10k | 1 | ~700 | ~1 | |
| 101 | ~700–1.5k | 6 | ~70 | ~2 | |
| 119 | ~700–2k | 5 | ~50 | ~2 | |
| 212 | ~1k–3k | 2 | ~150 | ~2 | |
| 154 | ~1k–3k | 2 | ~100 | ~2 |
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 42)
| File | # lines | # units |
|---|---|---|
| 1338 | 45 | |
| 650 | 31 | |
| 1289 | 28 | |
| 551 | 27 | |
| 265 | 26 | |
| 503 | 16 | |
| 413 | 14 | |
| 427 | 13 | |
| 219 | 13 | |
| 627 | 11 | |
| 212 | 10 | |
| 207 | 10 | |
| 252 | 9 | |
| 154 | 9 | |
| 333 | 9 | |
| 147 | 9 | |
| 93 | 9 | |
| 100 | 8 | |
| 92 | 7 | |
| 279 | 7 | |
| 119 | 7 | |
| 149 | 7 | |
| 140 | 7 | |
| 208 | 6 | |
| 265 | 5 | |
| 23 | 5 | |
| 27 | 5 | |
| 87 | 4 | |
| 51 | 4 | |
| 62 | 3 | |
| 72 | 3 | |
| 55 | 2 | |
| 41 | 2 | |
| 101 | 2 | |
| 40 | 2 | |
| 51 | 2 | |
| 38 | 2 | |
| 53 | 2 | |
| 34 | 1 | |
| 32 | 1 | |
| 24 | 1 | |
| 102 | 1 |
Files With Long Lines (Top 27)
There are 27 files with lines longer than 120 characters. In total, there are 101 long lines.
| File | # lines | # units | # long lines |
|---|---|---|---|
| 1338 | 45 | 15 | |
| 413 | 14 | 14 | |
| 627 | 11 | 13 | |
| 551 | 27 | 8 | |
| 427 | 13 | 7 | |
| 279 | 7 | 6 | |
| 265 | 26 | 5 | |
| 503 | 16 | 5 | |
| 212 | 10 | 3 | |
| 265 | 5 | 3 | |
| 92 | 7 | 2 | |
| 154 | 9 | 2 | |
| 333 | 9 | 2 | |
| 208 | 6 | 2 | |
| 119 | 7 | 2 | |
| 4 | - | 1 | |
| 6 | - | 1 | |
| 6 | - | 1 | |
| 4 | - | 1 | |
| 4 | - | 1 | |
| 4 | - | 1 | |
| 41 | 2 | 1 | |
| 100 | 8 | 1 | |
| 21 | - | 1 | |
| 219 | 13 | 1 | |
| 38 | 2 | 1 | |
| 207 | 10 | 1 |
Correlations
File Size vs. Commits (all time): 66 points
|
|
1338.0 | lines of code min: 1.0average: 160.26 25th percentile: 24.0 median: 59.0 75th percentile: 207.25 max: 1338.0 |
|
| 0 | 18.0 | ||
|
commits (all time) min: 1.0 | average: 5.89 | 25th percentile: 2.75 | median: 5.0 | 75th percentile: 8.0 | max: 18.0
|
|||
File Size vs. Contributors (all time): 66 points
|
|
1338.0 | lines of code min: 1.0average: 160.26 25th percentile: 24.0 median: 59.0 75th percentile: 207.25 max: 1338.0 |
|
| 0 | 6.0 | ||
|
contributors (all time) min: 1.0 | average: 3.39 | 25th percentile: 2.0 | median: 3.5 | 75th percentile: 5.0 | max: 6.0
|
|||
File Size vs. Commits (30 days): 23 points
|
|
1338.0 | lines of code min: 23.0average: 249.35 25th percentile: 56.0 median: 147.0 75th percentile: 333.0 max: 1338.0 |
|
| 0 | 3.0 | ||
|
commits (30d) min: 1.0 | average: 1.48 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 3.0
|
|||
File Size vs. Contributors (30 days): 23 points
|
|
1338.0 | lines of code min: 23.0average: 249.35 25th percentile: 56.0 median: 147.0 75th percentile: 333.0 max: 1338.0 |
|
| 0 | 2.0 | ||
|
contributors (30d) min: 1.0 | average: 1.09 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 2.0
|
|||
File Size vs. Commits (90 days): 35 points
|
|
1338.0 | lines of code min: 4.0average: 230.63 25th percentile: 24.0 median: 119.0 75th percentile: 279.0 max: 1338.0 |
|
| 0 | 6.0 | ||
|
commits (90d) min: 1.0 | average: 1.6 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 6.0
|
|||
File Size vs. Contributors (90 days): 35 points
|
|
1338.0 | lines of code min: 4.0average: 230.63 25th percentile: 24.0 median: 119.0 75th percentile: 279.0 max: 1338.0 |
|
| 0 | 3.0 | ||
|
contributors (90d) min: 1.0 | average: 1.11 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 1.0 | max: 3.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