MNN/apps/iOS/MNNLLMChat/MNNLLMiOS/MainTab/Benchmark/Models/BenchmarkResults.swift

27 lines
820 B
Swift
Raw Normal View History

2025-07-11 10:58:37 +08:00
//
// BenchmarkResults.swift
// MNNLLMiOS
//
// Created by () on 2025/7/10.
//
import Foundation
2025-08-29 15:38:24 +08:00
/// Structure containing comprehensive benchmark results for display and sharing.
/// Aggregates test results, memory usage, and metadata for result presentation.
2025-07-11 10:58:37 +08:00
struct BenchmarkResults {
let modelDisplayName: String
let maxMemoryKb: Int64
let testResults: [TestInstance]
let timestamp: String
2025-09-03 16:44:51 +08:00
let totalTimeSeconds: Float
2025-07-11 10:58:37 +08:00
2025-09-03 16:44:51 +08:00
init(modelDisplayName: String, maxMemoryKb: Int64, testResults: [TestInstance], timestamp: String, totalTimeSeconds: Float = 0.0) {
2025-07-11 10:58:37 +08:00
self.modelDisplayName = modelDisplayName
self.maxMemoryKb = maxMemoryKb
self.testResults = testResults
self.timestamp = timestamp
2025-09-03 16:44:51 +08:00
self.totalTimeSeconds = totalTimeSeconds
2025-07-11 10:58:37 +08:00
}
}