mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
51 lines
1.9 KiB
Swift
51 lines
1.9 KiB
Swift
//
|
|
// FleetMetrics.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct FleetMetrics: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** At is when this reading was MEASURED, RFC 3339 in UTC — not when the board was built. A console decides staleness by comparing it to now; the board deliberately does not decide that for it. */
|
|
public var at: String?
|
|
/** GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy, never 42. Across all of the unit's cards, not one of them. */
|
|
public var gpuUtil: Double?
|
|
/** Load1 is the host's 1-minute load average — runnable processes, not a percentage, so it is read against the unit's core count and can exceed 1. */
|
|
public var load1: Double?
|
|
/** MemFree is host memory still available, in BYTES. It is what the source reported, not fleetSpec.Memory minus MemUsed. */
|
|
public var memFree: Int64?
|
|
/** MemUsed is host memory in use, in BYTES. */
|
|
public var memUsed: Int64?
|
|
|
|
public init(at: String? = nil, gpuUtil: Double? = nil, load1: Double? = nil, memFree: Int64? = nil, memUsed: Int64? = nil) {
|
|
self.at = at
|
|
self.gpuUtil = gpuUtil
|
|
self.load1 = load1
|
|
self.memFree = memFree
|
|
self.memUsed = memUsed
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case at
|
|
case gpuUtil
|
|
case load1
|
|
case memFree
|
|
case memUsed
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(gpuUtil, forKey: .gpuUtil)
|
|
try container.encodeIfPresent(load1, forKey: .load1)
|
|
try container.encodeIfPresent(memFree, forKey: .memFree)
|
|
try container.encodeIfPresent(memUsed, forKey: .memUsed)
|
|
}
|
|
}
|
|
|