Skip to content

Commit

Permalink
Add tracing of check runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
dz0ny committed Oct 21, 2024
1 parent f541ca8 commit 814ec21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions Pareto/Checks/Claim.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import AppKit
import Defaults
import Foundation
import os.log
import OSLog
import SwiftUI

class Claim: Hashable {
Expand Down Expand Up @@ -65,7 +66,13 @@ class Claim: Hashable {

func run() {
for check in checks {
let startTime = Date()
check.run()

Check warning on line 70 in Pareto/Checks/Claim.swift

View workflow job for this annotation

GitHub Actions / Build and Archive SetApp

result of call to 'run()' is unused

Check warning on line 70 in Pareto/Checks/Claim.swift

View workflow job for this annotation

GitHub Actions / Build and Archive SetApp

result of call to 'run()' is unused

Check warning on line 70 in Pareto/Checks/Claim.swift

View workflow job for this annotation

GitHub Actions / Build and Archive Native

result of call to 'run()' is unused

Check warning on line 70 in Pareto/Checks/Claim.swift

View workflow job for this annotation

GitHub Actions / Build and Archive Native

result of call to 'run()' is unused
let endTime = Date()
let timeInterval = endTime.timeIntervalSince(startTime)
Logger().log("uuid=\(check.UUID, privacy: .public) timeInterval=\(timeInterval, privacy: .public)")


}
}

Expand Down
2 changes: 1 addition & 1 deletion Pareto/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>5474</string>
<string>5482</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit 814ec21

Please sign in to comment.