Metric reference

What each number in CodeLoupe means, how it is calculated, and how to read it. Examples use the sample repository ledgerline, analyzed over 12 months.

Getting started

You need IntelliJ IDEA or another JetBrains IDE, version 2025.2 or newer, and a project in a Git repository.

1. Install
Open Settings → Plugins → Marketplace, search for CodeLoupe and click Install. Not yet published — check back soon.
2. Open the tool window
Click the CodeLoupe icon in the tool window bar on the right side of the IDE.
3. Click Refresh
CodeLoupe reads the Git history for the selected time window in the background. The report is cached, so reopening the project on the same commit loads instantly; a new commit or a different window triggers a fresh scan.

Score 0–1

The hotspot score combines how often a file changes with how complex it is. A high score means the file is changed often and is complex, so investigate it first.

score = norm(revisions) × norm(complexity)

Both factors are normalized to 0–1 across the analyzed files. CodeLoupe also shows a percentile rank: top 2% means the file is among the highest-scoring 2% of files.

filePaymentReconciler.kt
revisions71 → 0.82
complexity412 → 1.00
score0.82 · top 2%

Revisions

The number of commits that touched the file within the time window, excluding mass commits.

revisions = commits touching the file in the window − mass commits − commits in .git-blame-ignore-revs

Renames are followed, so a file keeps its history after a move. Commits that touch more files than the mass-commit threshold (formatting sweeps, dependency bumps) are left out.

Churn

Lines added plus lines removed across all revisions in the window. It measures how much the file was rewritten, not how big it is.

churn = Σ (lines added + lines removed)

Rewriting the same 30 lines three times adds 180 to churn, even though the file ends up the same size.

Complexity

Measured from indentation. Deeper nesting scores higher. Because it only looks at leading whitespace, it works for any language without a parser.

Compare complexity between files in the same project. The absolute number depends on code style, so it is less useful across projects.

Authors

The number of distinct committers who changed the file within the time window. Many authors on a hotspot can point to coordination cost; one author can point to a knowledge silo — see Main author.

Main author

The author with the most revisions on the file, and their share of those revisions. Above 80%, the file is flagged as a knowledge silo.

share = revisions by top author ÷ revisions
silo = share > 0.80
sync/LedgerSync.ktTomasz Kowal · 91% · silo

In the map's author mode, files are colored with the Tableau10 palette by main author, and silos get a dashed outline.

Temporal coupling

Two files are temporally coupled when they keep changing in the same commits. When nothing in the code links them, this reveals a hidden dependency.

degree = shared commits ÷ ((revisions A + revisions B) ÷ 2)

A pair needs at least 5 shared commits to be listed.

api/Routes.kt ↔ web/src/api/client.ts29 shared · 0.62
billing/TaxCalculator.kt ↔ pages/Checkout.tsx17 shared · 0.51

Settings

Find them under Settings → Tools → CodeLoupe. Changing a setting takes effect on the next refresh.

Time window
How far back to read history: 3, 6, 12 or 24 months, or all history.
Exclusion globs
Paths to leave out of the analysis, such as **/generated/** or *.lock.
Mass-commit threshold
Commits that touch more files than this are ignored, so formatting sweeps don't inflate revisions.
Ignored revisions
Commits listed in .git-blame-ignore-revs are skipped.
Banner threshold
The percentile a file must reach to get the hotspot banner in the editor, e.g. top 10%.
← Back to the overview