Package com.yahoo.config.model.api
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
ConstructorsConstructorDescriptionOnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent) Creates an instance of aOnnxMemoryStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static OnnxMemoryStatsfromJson(com.fasterxml.jackson.databind.JsonNode json) Parse output from `vespa-analyze-onnx-model --probe-types`static OnnxMemoryStatsfromJson(ApplicationFile file) final inthashCode()Returns a hash code value for this object.longReturns the value of themallocCurrentrecord component.longReturns the value of themallocPeakrecord component.static com.yahoo.path.PathmemoryStatsFilePath(com.yahoo.path.Path modelPath) longcom.fasterxml.jackson.databind.JsonNodetoJson()final StringtoString()Returns a string representation of this record class.longvmRss()Returns the value of thevmRssrecord component.longvmSize()Returns the value of thevmSizerecord component.
-
Constructor Details
-
OnnxMemoryStats
public OnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent) Creates an instance of aOnnxMemoryStatsrecord class.- Parameters:
vmSize- the value for thevmSizerecord componentvmRss- the value for thevmRssrecord componentmallocPeak- the value for themallocPeakrecord componentmallocCurrent- the value for themallocCurrentrecord component
-
-
Method Details
-
fromJson
Parse output from `vespa-analyze-onnx-model --probe-types` -
fromJson
- 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
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. -
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. -
equals
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 '=='. -
vmSize
public long vmSize()Returns the value of thevmSizerecord component.- Returns:
- the value of the
vmSizerecord component
-
vmRss
public long vmRss()Returns the value of thevmRssrecord component.- Returns:
- the value of the
vmRssrecord component
-
mallocPeak
public long mallocPeak()Returns the value of themallocPeakrecord component.- Returns:
- the value of the
mallocPeakrecord component
-
mallocCurrent
public long mallocCurrent()Returns the value of themallocCurrentrecord component.- Returns:
- the value of the
mallocCurrentrecord component
-