Skip to content

Calculating metrics

Updated on 28 November 2026

A calculation measures one scope with one profile and puts the results in a new tab of the Stau Metro tool window.

Start a calculation

Choose Code | Calculate Metrics... You can also find the action by its name with the IDE's action search.

The dialog that opens has three parts.

The scope

The upper part is the IDE's own scope selector, the same one its code inspections use. It lets you measure the whole project, a module, the file or directory you had selected, your uncommitted files or a custom scope, and include or leave out the test sources.

What the plugin reads inside that scope is in “What is analyzed”.

The profile

Profile: lists the profiles you can calculate with:

  • The built-in ones appear as the question they answer, followed by their name in grey: How healthy is my code overall? Quick health check.
  • Yours appear by their name, followed by (user).

Under the list, the dialog describes the built-in profile you have chosen and says when to use it. The profile you choose stays selected for the next time.

The button Metrics Profiles... opens the dialog where profiles are created and edited (“Metrics profiles”). The eleven profiles that come with the plugin are in “Built-in profiles”.

The filter

Show only results that exceed a threshold leaves in the tables only the rows with a warning or an error. It is the same switch as the filter button of the results toolbar, so you can change your mind later without calculating again (“The results window”).

While it runs

The calculation is a background task named Computing Metrics. Its progress bar says what it is doing: Preparing analysis..., Scanning and the name of a file, Building dependency structure for the scope, Collecting results...

  • You can keep using the IDE.
  • If the IDE is indexing, the calculation waits for it.
  • To stop it, cancel the task from its progress bar. A cancelled calculation shows nothing.

How long it takes depends on the size of the scope and on the profile: a profile with a few metrics is much faster than one with all of them.

What you get

When the calculation ends, the Stau Metro tool window opens with a new tab named after the run:

Profile: Quick health check · Scope: Project 'shop' · Run at: Sat, 28 Nov 2026 10:15:02 CET

The tab opens on the Summary if some element goes beyond a threshold, and on the first table otherwise. Earlier runs keep their tabs until you close them, so you can have several open at once.

To repeat a calculation with the same scope and profile, use Recalculate in the toolbar of its tab instead of the menu (“The results window”).

When there are no results

Instead of a tab, the calculation can end with a notification on the tool window:

Message Why
Profile '…' has no enabled metrics The profile has every metric unchecked. Enable some in Metrics Profiles...
None of the metrics of profile '…' got values in the analyzed scope The scope has nothing those metrics measure, for example a profile of class metrics on a directory without classes
No metric exceeded its thresholds. The filter is on and nothing is beyond a threshold. Uncheck it to see every value

The other messages a calculation can show, such as a warning about partial values, are in “Messages and troubleshooting”.