From 814ec211ab279256f0b8e0e53a770d100ea3845f Mon Sep 17 00:00:00 2001 From: Janez T Date: Mon, 21 Oct 2024 17:36:27 +0200 Subject: [PATCH] Add tracing of check runtime --- Pareto/Checks/Claim.swift | 7 +++++++ Pareto/Info.plist | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Pareto/Checks/Claim.swift b/Pareto/Checks/Claim.swift index 3882de9..105a0db 100644 --- a/Pareto/Checks/Claim.swift +++ b/Pareto/Checks/Claim.swift @@ -9,6 +9,7 @@ import AppKit import Defaults import Foundation import os.log +import OSLog import SwiftUI class Claim: Hashable { @@ -65,7 +66,13 @@ class Claim: Hashable { func run() { for check in checks { + let startTime = Date() check.run() + let endTime = Date() + let timeInterval = endTime.timeIntervalSince(startTime) + Logger().log("uuid=\(check.UUID, privacy: .public) timeInterval=\(timeInterval, privacy: .public)") + + } } diff --git a/Pareto/Info.plist b/Pareto/Info.plist index f91208b..f8c264d 100644 --- a/Pareto/Info.plist +++ b/Pareto/Info.plist @@ -26,7 +26,7 @@ CFBundleVersion - 5474 + 5482 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion