Lightrun Metrics overview¶
Lightrun lets you acquire, in real-time, a broad range of performance metrics for timing, synchronization, and business logic. These metrics provide immediate answers for identifying bottlenecks, with minimal impact on performance.
Lightrun supports the following metric types: Counter, Method duration, Tic & Toc (Block Duration), and custom metrics.
Support and Retention
- Metrics currently are supported only for Java/JVM applications.
- From release 1.39, metrics are retained for 10 days after they expire. Following this period, the expired metrics are automatically deleted.
Typical use cases for metrics¶
With Lightrun Metrics, you can:
- Add metrics, on demand, to your running application code, until you identify the problem
- Count line execution occurrences
- Swiftly identify performance and synchronization issues in the same version you released
- Use timers, Tic & Toc function durations, and custom metrics, to investigate code behavior and measure performance
- Collect system statistics on latency, throughput, and other variables
Supported Lightrun Metric types¶
Counter metric¶
A Lightrun Counter is added to a single line of code. It counts the number of times the code line is reached. You can add a counter to any and as a many lines of code you need. From the Lightrun IDE plugin, you can specify the conditions (as Boolean expressions) when to record the line execution.
Method Duration metric¶
The Method Duration metric measures the elapsed time for executing a given method.
Tic & Toc (Block Duration) metric¶
The Lightrun Tic & Toc metric measures the elapsed time for executing a specified block of code, within the same function.
Custom metric¶
Lightrun enables you to design your own custom metric, using conditional expressions that evaluate to an integer result. Custom metrics can be created using the configuration form in the Lightrun IDE plugin or from the Lightrun CLI.
Start using Lightrun Metrics¶
- Create and manage Lightrun Metrics in the JetBrains IDE
- Create and manage metrics in the VS Code plugin