diff --git a/Benchmarks/Foundation/Foundation.swift b/Benchmarks/Foundation/Foundation.swift index a223f31..b726222 100644 --- a/Benchmarks/Foundation/Foundation.swift +++ b/Benchmarks/Foundation/Foundation.swift @@ -28,7 +28,7 @@ let benchmarks = { thresholds: [.wallClock: customThreshold, .throughput: customThreshold2]) - Benchmark.defaultConfiguration.metrics = [.throughput, .wallClock] + BenchmarkMetric.arc + Benchmark.defaultConfiguration.metrics = [.throughput, .wallClock] + .arc Benchmark("Foundation Date()", configuration: .init(scalingFactor: .mega)) { benchmark in diff --git a/Benchmarks/MemoryOne/MemoryOne.swift b/Benchmarks/MemoryOne/MemoryOne.swift index be69707..f0c9243 100644 --- a/Benchmarks/MemoryOne/MemoryOne.swift +++ b/Benchmarks/MemoryOne/MemoryOne.swift @@ -12,7 +12,7 @@ import Foundation import Benchmark let benchmarks = { - Benchmark.defaultConfiguration.metrics = BenchmarkMetric.memory + BenchmarkMetric.arc + Benchmark.defaultConfiguration.metrics = .memory + .arc Benchmark.defaultConfiguration.maxDuration = .seconds(3) Benchmark.defaultConfiguration.scalingFactor = .kilo diff --git a/Benchmarks/MemoryTwo/MemoryTwo.swift b/Benchmarks/MemoryTwo/MemoryTwo.swift index a19dc64..c6d58ee 100644 --- a/Benchmarks/MemoryTwo/MemoryTwo.swift +++ b/Benchmarks/MemoryTwo/MemoryTwo.swift @@ -12,7 +12,7 @@ import Foundation import Benchmark let benchmarks = { - Benchmark.defaultConfiguration.metrics = BenchmarkMetric.memory + BenchmarkMetric.arc + Benchmark.defaultConfiguration.metrics = .memory + .arc Benchmark.defaultConfiguration.maxDuration = .seconds(3) Benchmark.defaultConfiguration.scalingFactor = .kilo diff --git a/Benchmarks/Miscellaneous/Miscellaneous.swift b/Benchmarks/Miscellaneous/Miscellaneous.swift index b7e50a1..28f7e8b 100644 --- a/Benchmarks/Miscellaneous/Miscellaneous.swift +++ b/Benchmarks/Miscellaneous/Miscellaneous.swift @@ -29,7 +29,7 @@ let benchmarks = { } } - Benchmark.defaultConfiguration = .init(metrics: BenchmarkMetric.memory + BenchmarkMetric.arc) + Benchmark.defaultConfiguration = .init(metrics: .memory + .arc) Benchmark("Memory leak 123 allocations of 4K") { _ in performAllocations(count: 123, size: 4096, shouldFree: false) diff --git a/Benchmarks/Samples/Samples.swift b/Benchmarks/Samples/Samples.swift index 67f1b4e..576b9f5 100644 --- a/Benchmarks/Samples/Samples.swift +++ b/Benchmarks/Samples/Samples.swift @@ -80,7 +80,7 @@ let benchmarks = { } Benchmark("Extended metrics", - configuration: .init(metrics: BenchmarkMetric.extended)) { _ in + configuration: .init(metrics: .extended)) { _ in dummyCounter(defaultCounter()) } @@ -100,7 +100,7 @@ let benchmarks = { } Benchmark("Extended + custom metrics", - configuration: .init(metrics: BenchmarkMetric.extended + + configuration: .init(metrics: .extended + [CustomMetrics.one, CustomMetrics.two])) { benchmark in dummyCounter(defaultCounter()) benchmark.measurement(CustomMetrics.one, Int.random(in: 1 ... 1_000_000)) @@ -136,7 +136,7 @@ let benchmarks = { Benchmark("Disk metrics, writing 64K x 1.000", configuration: .init( - metrics: BenchmarkMetric.disk, + metrics: .disk, scalingFactor: .kilo, maxDuration: .seconds(1) )) { benchmark in @@ -176,17 +176,17 @@ let benchmarks = { } Benchmark("Memory metrics, async", - configuration: .init(metrics: BenchmarkMetric.memory)) { _ in + configuration: .init(metrics: .memory)) { _ in await concurrentWork(tasks: 10, mallocs: 1000) } Benchmark("System metrics, async", - configuration: .init(metrics: BenchmarkMetric.system)) { _ in + configuration: .init(metrics: .system)) { _ in await concurrentWork(mallocs: 10) } Benchmark("All metrics, full concurrency, async", - configuration: .init(metrics: BenchmarkMetric.all, maxDuration: .seconds(1))) { _ in + configuration: .init(metrics: .all, maxDuration: .seconds(1))) { _ in await concurrentWork(tasks: 80) } diff --git a/Package.resolved b/Package.resolved index 542e186..91b0ff1 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,8 +5,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ordo-one/package-benchmark", "state" : { - "revision" : "874ee0c184a4e89be111349b8dab2e61b6773937", - "version" : "1.6.1" + "revision" : "8cc2be5e4d0c91feea6d41ba20c05ee1a053d456", + "version" : "1.8.1" } }, { @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/ordo-one/package-datetime", "state" : { - "revision" : "9c1e16bfe7683e787161f866ff8b5cbc88089cb4", - "version" : "0.0.6" + "revision" : "d1242188c9f48aad297e6ca9b717776f8660bc31", + "version" : "1.0.2" } }, { @@ -50,8 +50,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser", "state" : { - "revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a", - "version" : "1.2.2" + "revision" : "8f4d2753f0e4778c76d5f05ad16c74f707390531", + "version" : "1.2.3" } }, {