From c9086aadaaf3bd02a3037bb7b7c19d5a01f6e394 Mon Sep 17 00:00:00 2001 From: Ahmed Shendy Date: Tue, 25 Feb 2025 04:02:09 +0200 Subject: [PATCH 1/3] Add analytics and notifications to BushelLogging.Category (#67) --- Sources/BushelLogging/BushelLogging.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/BushelLogging/BushelLogging.swift b/Sources/BushelLogging/BushelLogging.swift index 3974f78d..ffbf4114 100644 --- a/Sources/BushelLogging/BushelLogging.swift +++ b/Sources/BushelLogging/BushelLogging.swift @@ -40,5 +40,7 @@ public enum BushelLogging: LoggingSystem, Sendable { case observation case market case hub + case analytics + case notifications } } From a34fdbc31ebd61f745cb844b9d04a5cc5f83e617 Mon Sep 17 00:00:00 2001 From: Ahmed Shendy Date: Tue, 25 Feb 2025 04:02:28 +0200 Subject: [PATCH 2/3] Add Extension to SystemConfiguration to take UInt64 (#65) --- .../BushelFoundation/SystemConfiguration.swift | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Sources/BushelFoundation/SystemConfiguration.swift b/Sources/BushelFoundation/SystemConfiguration.swift index 5841c0ff..24ce0307 100644 --- a/Sources/BushelFoundation/SystemConfiguration.swift +++ b/Sources/BushelFoundation/SystemConfiguration.swift @@ -45,3 +45,19 @@ public struct SystemConfiguration: Sendable, Codable, Equatable { self.activeProcessorCount = activeProcessorCount } } + +extension SystemConfiguration { + public init( + operatingSystemVersionString: String, + physicalMemory: UInt64, + processorCount: UInt64, + activeProcessorCount: UInt64 + ) { + self.init( + operatingSystemVersionString: operatingSystemVersionString, + physicalMemory: Int(physicalMemory), + processorCount: Int(processorCount), + activeProcessorCount: Int(activeProcessorCount) + ) + } +} From e9e4b50dc5ef1f678ee50241eae40f96eb00a31c Mon Sep 17 00:00:00 2001 From: Ahmed Shendy Date: Tue, 25 Feb 2025 15:55:18 +0200 Subject: [PATCH 3/3] fix: only physicalMemory needs to be UInt64 --- Sources/BushelFoundation/SystemConfiguration.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/BushelFoundation/SystemConfiguration.swift b/Sources/BushelFoundation/SystemConfiguration.swift index 24ce0307..4690a6d5 100644 --- a/Sources/BushelFoundation/SystemConfiguration.swift +++ b/Sources/BushelFoundation/SystemConfiguration.swift @@ -50,14 +50,14 @@ extension SystemConfiguration { public init( operatingSystemVersionString: String, physicalMemory: UInt64, - processorCount: UInt64, - activeProcessorCount: UInt64 + processorCount: Int, + activeProcessorCount: Int ) { self.init( operatingSystemVersionString: operatingSystemVersionString, physicalMemory: Int(physicalMemory), - processorCount: Int(processorCount), - activeProcessorCount: Int(activeProcessorCount) + processorCount: processorCount, + activeProcessorCount: activeProcessorCount ) } }