History and evolution
Stau Metro keeps every run that finishes in the history of the project. With it you can compare the results with the previous run without saving or choosing any file, and see how a metric has been changing.
The history of a project
Every run that finishes with values is kept as a snapshot in the history of its project: those of Code | Calculate Metrics..., Repeat Last Calculation, Recalculate and Recalculate and Compare. A run without values, which opens no tab, is not kept.
- Nothing is written in the project. The history is in the system directory of the IDE, in
stau-metro/history, with a folder per project. It does not end up in version control and the team does not share it. - It keeps the last 20 runs of each project, whatever their scope and profile. When one more is saved, the oldest are deleted.
- Each file is a snapshot like the ones you save with Save Snapshot... (“File formats”). You do not have to open them: the two actions of this page use them.
In Settings | Tools | Stau Metro, Save every run in the history of the project turns it off and Runs kept per project: changes the number of runs (“Settings”). A lower limit applies the next time a run is saved. Turning it off does not delete what is already there.
Compare with the previous run
Use it to see what changed since the last time you measured the same thing, even if you closed its results or the IDE.
- Calculate, or open the tab of a run.
- Click Compare with Previous Run in the toolbar of the run, or press the chord Ctrl+Alt+Shift+9 and then P (Cmd+Option+Shift+9 and P on macOS). It is also in Find Action.
The plugin looks in the history for the latest run before the one shown with the same scope and the same profile, and compares with it. The comparison is the same as with a snapshot (“Comparing two runs”): the same tables, the same Summary, the same warnings about what could not be read.
- A profile is recognised by its identity, not by the name it shows: an included profile is the same even if you change the language of the plugin between one run and the next.
- A run older than 0.1.2 has no such identity, and is recognised by the name of the profile.
- The run shown is never its own previous run, nor is a later one: if you have an old tab open, it is compared with the run before it.
If the history has none, a balloon says The history of this project has no earlier run of this scope and profile., and reminds you that it may have been turned off in the settings.
The evolution of a metric
Is this metric getting better or worse over time?
Right-click a cell or the header of a metric column and choose Evolution... A window opens with a chart of the column over the runs of the history that have the scope and the profile of these results, plus the one shown:
Evolution: Cyclomatic Complexity (method)
Each point is a run, from the oldest to the newest, and the point of the results shown is marked. Rest the mouse on a point to read its date and its value.
Which series is drawn
The Series: list chooses one of these, since they have different scales:
| Series | What it is |
|---|---|
Total v(G) |
The total of the column, the one of the Total row of the table |
Average v(G) |
The mean of the column, the one of the Average row |
v(G) of com.acme.core.Box.get() |
The value of the element of the selected row, if there was one when the window opened |
A metric without a total or a mean only has the series of the element, so it needs a selected row. Without one, the menu does not offer Evolution...
The lines below
Runs: 8
From 4.2 (Fri, 20 Nov 2026 …) to 4.5 (Wed, 2 Dec 2026 …): +0.3
The second line gives the first value and the last one, with their dates, and the difference between them. For a
metric shown as a percentage, the difference is in points: +2.5 pp. With a single run it says Only these results
so far: the next runs of this scope and profile add their points., and if the series has no values, No values of
this series in the runs of the history.
Worth knowing
- The window does not block the IDE, follows its theme and closes by itself when you close the tab of its run.
- The series of an element follows it by the name of its row. If you rename or move it, the earlier runs have no value for it.
- Thresholds are not drawn: the history keeps values, not thresholds.
- Like the other charts, it needs the charts module of IntelliJ IDEA. Without it the menu has no Evolution... (“Charts”).
History or snapshot?
The history is automatic and stays on your machine: it is for seeing what is recent without thinking about files. A snapshot is saved by you wherever you like and lasts as long as you like: it is for comparing with a given moment, such as the last release, or for taking it to another machine (“Comparing two runs”).