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
2,774
of 3,309 in the current tree
Top 10 Files
20.2%
of the total hotspot score
Median File Size
31 lines
half of the files are at least this large
Median Changes
8 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. Showing the 2,000 highest-scoring of 2,774 files.

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. 1libs/partners/openai/langchain_openai/chat_models/base.py5,974 lines · 306 changes
  2. 2libs/core/tests/unit_tests/runnables/test_runnable.py6,486 lines · 215 changes
  3. 3libs/core/langchain_core/runnables/base.py6,718 lines · 210 changes
  4. 4libs/partners/openrouter/langchain_openrouter/data/_profiles.py8,356 lines · 177 changes
  5. 5libs/partners/anthropic/langchain_anthropic/chat_models.py3,631 lines · 247 changes
  6. 6libs/partners/anthropic/tests/unit_tests/test_chat_models.py6,981 lines · 133 changes
  7. 7libs/partners/openai/tests/unit_tests/chat_models/test_base.py6,444 lines · 135 changes
  8. 8libs/core/tests/unit_tests/test_tools.py4,933 lines · 149 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 2,774 files