Class MvnResourceUsage_2_0
- All Implemented Interfaces:
com.gradle.scan.eventmodel.EventData
An event stream will contain a single MvnResourceUsage_2_0
if resource usage capturing is enabled, none otherwise.
All captured metrics are sampled according to the captured timestamps
. That is, it is guaranteed that the length of the timestamps
list corresponds to the length of the captured metric lists/arrays, unless explicitly stated.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal byte[]
The total CPU load of the system, for each sample.The normalized sum of the CPU load of all processes, expressed as a percentage, for each sample.The normalized memory used by the system, in bytes, for each sample.The normalized CPU load of the child processes of the build process, expressed as a percentage, for each sample.The normalized memory allocated to the descendant processes of the build process, in bytes, for each sample.The normalized CPU load of the build process, expressed as a percentage, for each sample.The normalized memory allocated to the build process, in bytes, for each sample.The normalized disk read throughput, in bytes/s, for each sample.The normalized disk write throughput, in bytes/s, for each sample.The normalized network download throughput, in bytes/s, for each sample.The normalized network upload throughput, in bytes/s, for each sample.final List
<MvnProcess_1_0> The list of all significantly important processes seen during the build execution.final List
<byte[]> The list of Epoch-based timestamps, in milliseconds, corresponding to each sample that was captured.A normalized representation of the 5 most CPU-intensive processes, for each sample, along with their respective CPU load, expressed as a percentage.A normalized representation of the 5 most memory-allocated processes, for each sample, along with their respective allocated memory, expressed in bytes.final @Nullable("when resource capturing initialization didn\'t finish or failed") Long
The total system memory, in bytes. -
Constructor Summary
ConstructorDescriptionMvnResourceUsage_2_0
(List<byte[]> timestamps, MvnResourceUsageNormalizedSamples_1_0 buildProcessCpu, MvnResourceUsageNormalizedSamples_1_0 buildChildProcessesCpu, MvnResourceUsageNormalizedSamples_1_0 allProcessesCpuSum, byte[] allProcessesCpu, MvnResourceUsageNormalizedSamples_1_0 buildProcessMemory, MvnResourceUsageNormalizedSamples_1_0 buildChildProcessesMemory, MvnResourceUsageNormalizedSamples_1_0 allProcessesMemory, @Nullable Long totalSystemMemory, MvnResourceUsageNormalizedSamples_1_0 diskReadSpeed, MvnResourceUsageNormalizedSamples_1_0 diskWriteSpeed, MvnResourceUsageNormalizedSamples_1_0 networkDownloadSpeed, MvnResourceUsageNormalizedSamples_1_0 networkUploadSpeed, List<MvnProcess_1_0> processes, MvnResourceUsageIndexedNormalizedSamples_1_0 topProcessesByCpu, MvnResourceUsageIndexedNormalizedSamples_1_0 topProcessesByMemory) -
Method Summary
-
Field Details
-
timestamps
The list of Epoch-based timestamps, in milliseconds, corresponding to each sample that was captured. Each timestamp correspond to a byte array in the list.Longs are encoded by "deltas of deltas", and each long is converted to the minimal byte array needed to store it.
- First timestamp is written fully.
- The delta of the second timestamp is written, compared to the first timestamp.
- For the remaining timestamps, the delta of its delta to the previous timestamp is written.
-
buildProcessCpu
The normalized CPU load of the build process, expressed as a percentage, for each sample. -
buildChildProcessesCpu
The normalized CPU load of the child processes of the build process, expressed as a percentage, for each sample. -
allProcessesCpuSum
The normalized sum of the CPU load of all processes, expressed as a percentage, for each sample.This is used to normalize the build process and descendant processes loads, to be consistent with
allProcessesCpu
, because the granularity of capturing the process loads might be very low. -
allProcessesCpu
public final byte[] allProcessesCpuThe total CPU load of the system, for each sample.This is captured by looking at the loads of all the processors in the system, instead of looking at the processes link in
allProcessesCpuSum
. Therefore, it is more accurate.Each value is guaranteed to be in the [0,100] range.
-
buildProcessMemory
The normalized memory allocated to the build process, in bytes, for each sample.This corresponds to memory in RAM. It does not include memory that is swapped out. It does include memory from shared libraries as long as the pages from those libraries are actually in memory. It does include all stack and heap memory.
-
buildChildProcessesMemory
The normalized memory allocated to the descendant processes of the build process, in bytes, for each sample.This corresponds to memory in RAM. It does not include memory that is swapped out. It does include memory from shared libraries as long as the pages from those libraries are actually in memory. It does include all stack and heap memory.
-
allProcessesMemory
The normalized memory used by the system, in bytes, for each sample.This corresponds to the total memory in RAM minus the available memory in RAM.
-
totalSystemMemory
@Nullable("when resource capturing initialization didn\'t finish or failed") public final @Nullable("when resource capturing initialization didn\'t finish or failed") Long totalSystemMemoryThe total system memory, in bytes.This is the total physical memory installed on the machine.
-
diskReadSpeed
The normalized disk read throughput, in bytes/s, for each sample.This is an approximate throughput computed by checking the number of bytes read from all physical hard disks or similar storage devices since the last sample.
-
diskWriteSpeed
The normalized disk write throughput, in bytes/s, for each sample.This is an approximate throughput computed by checking the number of bytes written to all physical hard disks or similar storage devices since the last sample.
-
networkDownloadSpeed
The normalized network download throughput, in bytes/s, for each sample.This is an approximate throughput computed by checking the number of bytes received through all non-local network interfaces since the last sample.
-
networkUploadSpeed
The normalized network upload throughput, in bytes/s, for each sample.This is an approximate throughput computed by checking the number of bytes sent through all non-local network interfaces since the last sample.
-
processes
The list of all significantly important processes seen during the build execution.A process is captured if it is part of the 5-most CPU-intensive processes for at least one sample.
This list is a global aggregation of important processes, and does not necessarily have the same length as the various captured sample collections.
-
topProcessesByCpu
A normalized representation of the 5 most CPU-intensive processes, for each sample, along with their respective CPU load, expressed as a percentage. -
topProcessesByMemory
A normalized representation of the 5 most memory-allocated processes, for each sample, along with their respective allocated memory, expressed in bytes.
-
-
Constructor Details
-
MvnResourceUsage_2_0
public MvnResourceUsage_2_0(List<byte[]> timestamps, MvnResourceUsageNormalizedSamples_1_0 buildProcessCpu, MvnResourceUsageNormalizedSamples_1_0 buildChildProcessesCpu, MvnResourceUsageNormalizedSamples_1_0 allProcessesCpuSum, byte[] allProcessesCpu, MvnResourceUsageNormalizedSamples_1_0 buildProcessMemory, MvnResourceUsageNormalizedSamples_1_0 buildChildProcessesMemory, MvnResourceUsageNormalizedSamples_1_0 allProcessesMemory, @Nullable @Nullable Long totalSystemMemory, MvnResourceUsageNormalizedSamples_1_0 diskReadSpeed, MvnResourceUsageNormalizedSamples_1_0 diskWriteSpeed, MvnResourceUsageNormalizedSamples_1_0 networkDownloadSpeed, MvnResourceUsageNormalizedSamples_1_0 networkUploadSpeed, List<MvnProcess_1_0> processes, MvnResourceUsageIndexedNormalizedSamples_1_0 topProcessesByCpu, MvnResourceUsageIndexedNormalizedSamples_1_0 topProcessesByMemory)
-
-
Method Details