@@ -33,8 +33,8 @@ struct BenchmarkMachine: Codable, Equatable {
3333
3434 var hostname : String
3535 var processors : Int
36- var processorType : String // e.g. arm64e
37- var memory : Int // in GB
36+ var processorType : String // e.g. arm64e
37+ var memory : Int // in GB
3838 var kernelVersion : String
3939
4040 public static func == ( lhs: BenchmarkMachine , rhs: BenchmarkMachine ) -> Bool {
@@ -48,8 +48,8 @@ struct BenchmarkIdentifier: Codable, Hashable {
4848 self . name = name
4949 }
5050
51- var target : String // The name of the executable benchmark target id
52- var name : String // The name of the benchmark
51+ var target : String // The name of the executable benchmark target id
52+ var name : String // The name of the benchmark
5353
5454 public func hash( into hasher: inout Hasher ) {
5555 hasher. combine ( target)
@@ -178,7 +178,7 @@ let baselinesDirectory: String = ".benchmarkBaselines"
178178extension BenchmarkTool {
179179 func printAllBaselines( ) {
180180 var storagePath = FilePath ( baselineStoragePath)
181- storagePath. append ( baselinesDirectory) // package/.benchmarkBaselines
181+ storagePath. append ( baselinesDirectory) // package/.benchmarkBaselines
182182 for file in storagePath. directoryEntries {
183183 if file. ends ( with: " . " ) == false ,
184184 file. ends ( with: " .. " ) == false
@@ -206,7 +206,7 @@ extension BenchmarkTool {
206206 var storagePath = FilePath ( baselineStoragePath)
207207 let filemanager = FileManager . default
208208
209- storagePath. append ( baselinesDirectory) // package/.benchmarkBaselines
209+ storagePath. append ( baselinesDirectory) // package/.benchmarkBaselines
210210 for file in storagePath. directoryEntries {
211211 if file. ends ( with: " . " ) == false ,
212212 file. ends ( with: " .. " ) == false
@@ -284,14 +284,14 @@ extension BenchmarkTool {
284284 │ └── ...
285285 └── ...
286286 */
287- var outputPath = FilePath ( baselineStoragePath) // package
288- var subPath = FilePath ( ) // subpath rooted in package used for directory creation
287+ var outputPath = FilePath ( baselineStoragePath) // package
288+ var subPath = FilePath ( ) // subpath rooted in package used for directory creation
289289
290- subPath. append ( baselinesDirectory) // package/.benchmarkBaselines
291- subPath. append ( " \( target) " ) // package/.benchmarkBaselines/myTarget1
292- subPath. append ( baselineName) // package/.benchmarkBaselines/myTarget1/named1
290+ subPath. append ( baselinesDirectory) // package/.benchmarkBaselines
291+ subPath. append ( " \( target) " ) // package/.benchmarkBaselines/myTarget1
292+ subPath. append ( baselineName) // package/.benchmarkBaselines/myTarget1/named1
293293
294- outputPath. createSubPath ( subPath) // Create destination subpath if needed
294+ outputPath. createSubPath ( subPath) // Create destination subpath if needed
295295
296296 outputPath. append ( subPath. components)
297297
@@ -348,13 +348,13 @@ extension BenchmarkTool {
348348 baselineIdentifier: String ? = nil
349349 ) throws -> BenchmarkBaseline ? {
350350 var path = FilePath ( baselineStoragePath)
351- path. append ( baselinesDirectory) // package/.benchmarkBaselines
352- path. append ( FilePath . Component ( target) !) // package/.benchmarkBaselines/myTarget1
351+ path. append ( baselinesDirectory) // package/.benchmarkBaselines
352+ path. append ( FilePath . Component ( target) !) // package/.benchmarkBaselines/myTarget1
353353
354354 if let baselineIdentifier {
355- path. append ( baselineIdentifier) // package/.benchmarkBaselines/myTarget1/named1
355+ path. append ( baselineIdentifier) // package/.benchmarkBaselines/myTarget1/named1
356356 } else {
357- path. append ( " default " ) // // package/.benchmarkBaselines/myTarget1/default
357+ path. append ( " default " ) // // package/.benchmarkBaselines/myTarget1/default
358358 }
359359
360360 if let hostIdentifier {
@@ -376,7 +376,7 @@ extension BenchmarkTool {
376376 let bufferSize = 16 * 1_024 * 1_024
377377 var done = false
378378
379- while done == false { // readBytes.count < bufferLength {
379+ while done == false { // readBytes.count < bufferLength {
380380 let nextBytes = try [ UInt8] ( unsafeUninitializedCapacity: bufferSize) { buf, count in
381381 count = try fd. read ( into: UnsafeMutableRawBufferPointer ( buf) )
382382 if count == 0 {
@@ -396,7 +396,7 @@ extension BenchmarkTool {
396396 print ( " Failed to close fd for \( path) after reading. " )
397397 }
398398 } catch {
399- if errno != ENOENT { // file not found is ok, e.g. when no baselines exist
399+ if errno != ENOENT { // file not found is ok, e.g. when no baselines exist
400400 print ( " Failed to open file \( path) , errno = [ \( errno) ] " )
401401 }
402402 }
@@ -522,11 +522,11 @@ extension BenchmarkBaseline: Equatable {
522522
523523 for (lhsBenchmarkIdentifier, lhsBenchmarkResults) in lhs. results {
524524 for lhsBenchmarkResult in lhsBenchmarkResults {
525- guard let rhsResults = rhs. results. first ( where: { $0. key == lhsBenchmarkIdentifier } ) else { // We couldn't find a result for one of the tests
525+ guard let rhsResults = rhs. results. first ( where: { $0. key == lhsBenchmarkIdentifier } ) else { // We couldn't find a result for one of the tests
526526 return false
527527 }
528528 guard let rhsBenchmarkResult = rhsResults. value. first ( where: { $0. metric == lhsBenchmarkResult. metric } )
529- else { // We couldn't find the specific metric
529+ else { // We couldn't find the specific metric
530530 return false
531531 }
532532 if lhsBenchmarkResult != rhsBenchmarkResult {
0 commit comments