Resource Statistics
5/14/25Less than 1 minutecomponentcpumemory
Resource Statistics Usage Example
stat
is a component that collects usage statistics for system and service resources (CPU, memory).
Click to view Resource Statistics Usage Example.
Resource Statistics Configuration
In services created by sponge, the resource statistics component is enabled by default.
Set the field enableStat
in the yaml configuration file under the configs
directory:
app:
enableStat: true # Whether resource statistics is enabled, true: enable, false: disable
By default, statistics are collected once per minute and output to the log. Resource statistics include CPU and memory related data for both the system and the service itself.