Hotspots

Files that are both large and changed often are where bugs tend to cluster and where refactoring pays off first. Each file of code in the current tree, tests included, is placed by its size and by the number of commits that changed it, under this name or one it had before; its hotspot score is changes × √lines. Documentation, vendored and generated files, and files without counted lines, such as binary files, are left out.

Files Analyzed
1,087
of 3,279 in the current tree
Top 10 Files
40.4%
of the total hotspot score
Median File Size
41 lines
half of the files are at least this large
Median Changes
4 commits
half of the files changed at least this often

Change frequency by file size

Each dot is a file; a bigger dot is a higher score. The dashed lines mark the median file size and the median number of changes: the large files that change often, in the top right, are in color. The 5 highest scores are numbered as in the list. Both axes are logarithmic.

Chart not shown: it is drawn with JavaScript, which is turned off or blocked on this page, as it is on Jenkins by default. How to show the charts

Highest scores

  1. 1fastapi/routing.py6,963 lines · 195 changes
  2. 2fastapi/applications.py5,132 lines · 113 changes
  3. 3fastapi/dependencies/utils.py1,513 lines · 186 changes
  4. 4pyproject.toml434 lines · 254 changes
  5. 5fastapi/openapi/utils.py671 lines · 92 changes
  6. 6.github/workflows/test.yml343 lines · 112 changes
  7. 7fastapi/__init__.py25 lines · 382 changes
  8. 8scripts/docs.py760 lines · 67 changes

Top hotspots

The files ranked by hotspot score: the larger a file is and the more often it changes, the higher it ranks. Authors is how many people have changed the file, bots aside, as on the Code Ownership page: a hotspot only one person has changed is also a bus-factor risk.

Table: the 100 highest-scoring of 1,087 files