[swcomp] Remove benchmark convert command

This commit is contained in:
Timofey Solomko committed 2026-06-27 17:46:34 +08:00
1 parent 2ef1453b40
commit 8a2dcb53e2
2 files changed
+1 -27

No files matched your search

@@ -15,8 +15,7 @@ final class BenchmarkGroup: CommandGroup {
let children: [Routable] = [
RunBenchmarkCommand(),
ShowBenchmarkCommand(),
RemoveRunCommand(),
ConvertCommand()
RemoveRunCommand()
]
}
@@ -1,25 +0,0 @@
// Copyright (c) 2026 Timofey Solomko
// Licensed under MIT License
//
// See LICENSE for license information
import Foundation
import SwiftCLI
final class ConvertCommand: Command {
let name = "convert"
let shortDescription = "Converts save file to a new format"
let longDescription = "Converts specified with saved benchmark results to a new format"
@Param var path: String
func execute() throws {
let oldSaveFile = try OldSaveFile.load(from: self.path)
let encoder = JSONEncoder()
encoder.outputFormatting = [.prettyPrinted, .sortedKeys]
let data = try encoder.encode(SaveFile(oldSaveFile))
try data.write(to: URL(fileURLWithPath: path))
}
}