Record Class OnnxMemoryStats

java.lang.Object
java.lang.Record
com.yahoo.config.model.api.OnnxMemoryStats

public record OnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent) extends Record
Memory statistics as reported by vespa-analyze-onnx-model.
Author:
bjorncs
  • Constructor Summary

    Constructors
    Constructor
    Description
    OnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent)
    Creates an instance of a OnnxMemoryStats record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    fromJson(com.fasterxml.jackson.databind.JsonNode json)
    Parse output from `vespa-analyze-onnx-model --probe-types`
     
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the mallocCurrent record component.
    long
    Returns the value of the mallocPeak record component.
    static com.yahoo.path.Path
    memoryStatsFilePath(com.yahoo.path.Path modelPath)
     
    long
     
    com.fasterxml.jackson.databind.JsonNode
     
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the vmRss record component.
    long
    Returns the value of the vmSize record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • OnnxMemoryStats

      public OnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent)
      Creates an instance of a OnnxMemoryStats record class.
      Parameters:
      vmSize - the value for the vmSize record component
      vmRss - the value for the vmRss record component
      mallocPeak - the value for the mallocPeak record component
      mallocCurrent - the value for the mallocCurrent record component
  • Method Details

    • fromJson

      public static OnnxMemoryStats fromJson(com.fasterxml.jackson.databind.JsonNode json)
      Parse output from `vespa-analyze-onnx-model --probe-types`
    • fromJson

      public static OnnxMemoryStats fromJson(ApplicationFile file) throws IOException
      Throws:
      IOException
      See Also:
    • memoryStatsFilePath

      public static com.yahoo.path.Path memoryStatsFilePath(com.yahoo.path.Path modelPath)
    • peakMemoryUsage

      public long peakMemoryUsage()
    • toJson

      public com.fasterxml.jackson.databind.JsonNode toJson()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • vmSize

      public long vmSize()
      Returns the value of the vmSize record component.
      Returns:
      the value of the vmSize record component
    • vmRss

      public long vmRss()
      Returns the value of the vmRss record component.
      Returns:
      the value of the vmRss record component
    • mallocPeak

      public long mallocPeak()
      Returns the value of the mallocPeak record component.
      Returns:
      the value of the mallocPeak record component
    • mallocCurrent

      public long mallocCurrent()
      Returns the value of the mallocCurrent record component.
      Returns:
      the value of the mallocCurrent record component