Class MvnResourceUsage_1_0

java.lang.Object
com.gradle.scan.eventmodel.maven.MvnResourceUsage_1_0
All Implemented Interfaces:
com.gradle.scan.eventmodel.EventData

@MavenVersion(since="3.3.1") @MavenExtensionVersion(since="1.22") public class MvnResourceUsage_1_0 extends Object implements com.gradle.scan.eventmodel.EventData
The machine resource usage information captured while the build is running.

An event stream will contain a single MvnResourceUsage_1_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 Details

    • timestamps

      public final List<byte[]> 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

      public final MvnResourceUsageNormalizedSamples_1_0 buildProcessCpu
      The normalized CPU load of the build process, expressed as a percentage, for each sample.
    • buildChildProcessesCpu

      public final MvnResourceUsageNormalizedSamples_1_0 buildChildProcessesCpu
      The normalized CPU load of the child processes of the build process, expressed as a percentage, for each sample.
    • allProcessesCpuSum

      public final MvnResourceUsageNormalizedSamples_1_0 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[] allProcessesCpu
      The 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

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final MvnResourceUsageNormalizedSamples_1_0 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 totalSystemMemory
      The total system memory, in bytes.

      This is the total physical memory installed on the machine.

    • diskReadSpeed

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final MvnResourceUsageNormalizedSamples_1_0 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

      public final List<MvnProcess_1_0> 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.

    • topProcesses

      public final List<List<Integer>> topProcesses
      A list of the 5 most CPU-intensive processes, for each sample.

      The list for a given sample is guaranteed to contain at most 5 elements, but may contain fewer elements, and may be empty if the collection failed or timed out.

      Each Integer in the inner list corresponds to the index of the process in processes.

  • Constructor Details

  • Method Details