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
ConstructorDescriptionOnnxMemoryStats
(long vmSize, long vmRss, long mallocPeak, long mallocCurrent) Creates an instance of aOnnxMemoryStats
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.static OnnxMemoryStats
fromJson
(com.fasterxml.jackson.databind.JsonNode json) Parse output from `vespa-analyze-onnx-model --probe-types`static OnnxMemoryStats
fromJson
(ApplicationFile file) final int
hashCode()
Returns a hash code value for this object.long
Returns the value of themallocCurrent
record component.long
Returns the value of themallocPeak
record component.static com.yahoo.path.Path
memoryStatsFilePath
(com.yahoo.path.Path modelPath) long
com.fasterxml.jackson.databind.JsonNode
toJson()
final String
toString()
Returns a string representation of this record class.long
vmRss()
Returns the value of thevmRss
record component.long
vmSize()
Returns the value of thevmSize
record component.
-
Constructor Details
-
OnnxMemoryStats
public OnnxMemoryStats(long vmSize, long vmRss, long mallocPeak, long mallocCurrent) Creates an instance of aOnnxMemoryStats
record class.- Parameters:
vmSize
- the value for thevmSize
record componentvmRss
- the value for thevmRss
record componentmallocPeak
- the value for themallocPeak
record componentmallocCurrent
- the value for themallocCurrent
record 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 thevmSize
record component.- Returns:
- the value of the
vmSize
record component
-
vmRss
public long vmRss()Returns the value of thevmRss
record component.- Returns:
- the value of the
vmRss
record component
-
mallocPeak
public long mallocPeak()Returns the value of themallocPeak
record component.- Returns:
- the value of the
mallocPeak
record component
-
mallocCurrent
public long mallocCurrent()Returns the value of themallocCurrent
record component.- Returns:
- the value of the
mallocCurrent
record component
-