Messages and troubleshooting
Messages of a calculation
They appear as a notification on the Stau Metro tool window.
| Message | What it means | What to do |
|---|---|---|
| Profile '…' has no enabled metrics | The profile has every metric unchecked | Enable metrics in Metrics Profiles... or choose another profile |
| None of the metrics of profile '…' got values in the analyzed scope | The scope has nothing the metrics of the profile measure | Widen the scope or choose a profile that fits it |
| No metric exceeded its thresholds. | The filter of the results is on and nothing is beyond a threshold | Good news. Uncheck Show only results that exceed a threshold to see the values |
| The analyzed scope no longer exists: calculate the metrics again from the menu | The scope of the run is gone: a deleted module or directory, for example | Start again from Code | Calculate Metrics... |
| Some metrics failed on some files, so their values may be partial: … | The metrics it names could not be calculated on some file. The results are shown, and those metrics lack what that file would add | See “Partial values” |
| The metrics could not be calculated: … | The calculation stopped on an error | See “A calculation that fails” |
Partial values
A metric that fails on a file is left out for that file and goes on with the others, so that one problem does not cost you the whole run. The usual cause is code the IDE cannot resolve at that moment: a file with syntax errors, or a project whose dependencies have not finished loading.
- Wait for the IDE to finish indexing and loading the project, and check that the code compiles.
- Use Recalculate.
- If the same metric fails again, the log of the IDE (Help | Show Log in …) has the error and the file it happened in. That is what to send with a report.
A calculation that fails
The message ends with the reason. A lack of memory on a very large scope is the usual one: measure a smaller scope, use a profile with fewer metrics, or give the IDE more memory in Help | Change Memory Settings. For any other reason, the log of the IDE has the detail.
Messages of the results
| Message | Where | What it means |
|---|---|---|
| This element is no longer in the results table | Show in Table, or a double-click in the charts | The table does not have the row: the filter hides it or the results changed since the chart was opened |
| Could not read the snapshot … | Compare with Snapshot... | The file is not a snapshot or is damaged |
| The snapshot measured … in project …, and these results … in project … | Compare with Snapshot... | The two sides have a different origin. The comparison is shown anyway (“Comparing two runs”) |
| Could not save the snapshot to … | Save Snapshot... | The file could not be written. The message gives the reason |
| Could not export the metrics to … | Export Results... | The file could not be written. The message gives the reason |
| Could not save the profile '…' | Metrics Profiles..., Edit Thresholds... | The file of the profile could not be written. The profile stays as it was |
| The chart could not be drawn: … | Charts... | A chart failed. The other tabs still work |
The messages of the Summary when it has nothing to list are in “The Summary”, and those of the threshold editor in “Thresholds”.
Questions
Calculate Metrics... is in the Code menu. If it is missing, check in Settings | Plugins that Stau Metro is installed and enabled, and that you installed the build for your version of the IDE (“Installation”).
The tool window is not there
It exists only while it has results. Run a calculation and it comes back.
A file, a class or a method is missing
Check, in this order:
- That the filter Show Only Rows That Exceed a Threshold is off.
- That the element is inside the scope you measured.
- That its file is one the plugin reads: a source file of the project, not excluded, and under a source root if it is Java (“What is analyzed”).
- That it is an element with a row: anonymous and local classes do not have one.
A category has no tab
The profile has no enabled metric of that category, the scope has no element of it, or you calculated with the filter on and none of its rows exceeds a threshold.
A column I expected is missing
The metric is not enabled in the profile of the run, or it has no value for any element of the scope. The title of the tab says which profile the run used. If you enabled the metric after calculating, use Recalculate.
A cell is empty
The metric does not apply to that element, or it could not be calculated for it. Its help says which elements it measures.
There are no icons, or the Summary is empty
The metrics of the profile have no thresholds in effect: they are informative metrics, or the profile switched their limits off. “Thresholds” explains the modes.
Kotlin code has no rows
Check that the Kotlin plugin of the IDE is enabled. Scripts (.kts) and code of platforms other than the JVM are
not measured.
Edit Thresholds... is disabled
Rest the mouse on the button: its tooltip gives the reason. The three cases are in “Thresholds”.
The plugin is in the wrong language
Choose it in Settings | Tools | Stau Metro. Results that are already open change when you recalculate (“Settings”).
My profiles are gone after reinstalling the IDE
Profiles live in the configuration directory of each IDE installation, in stau-metro-profiles. A new major version
of the IDE usually offers to import the configuration of the old one. If it did not, copy that folder yourself.
The values differ from those of another tool
Tools count differently, and none is wrong for it: what a line is, what adds a branch, whether a lambda is a method. The help of each metric states the rule the plugin applies, and “metrics.stau.me”, in Spanish, compares the rules of the usual tools.