Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
01a6f16
Merge tag '0.30.3' into develop
intitni Feb 7, 2024
c3d4dff
Update issue templates
intitni Feb 7, 2024
73cf3ab
Add WindowsController
intitni Feb 13, 2024
78ce489
Make WidgetLocation Equatable
intitni Feb 13, 2024
3c9dfc4
Move windows to WindowsController
intitni Feb 13, 2024
163f8d5
Update the dependency to hold a WindowsController instead
intitni Feb 13, 2024
eabb647
Remove useless actions
intitni Feb 13, 2024
f3275a1
Update windows getter
intitni Feb 13, 2024
e280dbd
Merge branch 'feature/improve-performance-of-widgets' into develop
intitni Feb 14, 2024
098e7e3
Make focusedEditorContent a function marked as expensive
intitni Feb 14, 2024
342ab60
Rename WindowsController to WidgetWindowsController
intitni Feb 14, 2024
6d65d57
Fix that a task is not stored
intitni Feb 14, 2024
a78ed53
Add throttler to RealtimeSuggestionController
intitni Feb 14, 2024
20bdfbd
Throttle location generation
intitni Feb 14, 2024
9a7ce06
Bump version to 0.30.4
intitni Feb 14, 2024
578802a
Merge tag '0.30.4.beta.1' into develop
intitni Feb 14, 2024
250bdf9
Remove scroll event throttle
intitni Feb 15, 2024
10f2a93
Add DebounceFunction and ThrottleFunction
intitni Feb 15, 2024
12ff573
Remove some use of MainActor
intitni Feb 15, 2024
3a1f4c3
Update circular widget implementation
intitni Feb 15, 2024
d480527
Update
intitni Feb 15, 2024
02ab5ca
Update signpost API
intitni Feb 15, 2024
72a8565
Fix dependecy
intitni Feb 15, 2024
7c5c105
Bump build number
intitni Feb 15, 2024
d1d118e
Tweak widget behavior
intitni Feb 15, 2024
060e08c
Make WidgetWindowsController an actor
intitni Feb 15, 2024
df7ad31
Bring back some main actors
intitni Feb 15, 2024
cbe4ec7
Merge tag '0.30.4.beta.2' into develop
intitni Feb 15, 2024
1973c99
Adjust widget transition when switching apps
intitni Feb 16, 2024
919c7ad
Bump version
intitni Feb 17, 2024
653459c
Update appcast.xml
intitni Feb 17, 2024
0cc2e7a
Merge branch 'release/0.30.4'
intitni Feb 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update signpost API
  • Loading branch information
intitni committed Feb 15, 2024
commit 02ab5cab96878b4acf83f39c97b19fa8b32469aa
2 changes: 1 addition & 1 deletion Pro
Submodule Pro updated from 954604 to 3d7a24
43 changes: 38 additions & 5 deletions Tool/Sources/Logger/Logger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,47 @@ public final class Logger {
function: function
)
}

public func signpost(
_ type: OSSignpostType,

public func signpostBegin(
name: StaticString,
file: StaticString = #file,
line: UInt = #line,
function: StaticString = #function
) {
os_signpost(type, log: osLog, name: name)
) -> Signposter {
let poster = OSSignposter(logHandle: osLog)
let id = poster.makeSignpostID()
let state = poster.beginInterval(name, id: id)
return .init(log: osLog, id: id, name: name, signposter: poster, beginState: state)
}

public struct Signposter {
let log: OSLog
let id: OSSignpostID
let name: StaticString
let signposter: OSSignposter
let state: OSSignpostIntervalState

init(
log: OSLog,
id: OSSignpostID,
name: StaticString,
signposter: OSSignposter,
beginState: OSSignpostIntervalState
) {
self.id = id
self.log = log
self.name = name
self.signposter = signposter
state = beginState
}

public func end() {
signposter.endInterval(name, state)
}

public func event(_ text: String) {
signposter.emitEvent(name, id: id, "\(text, privacy: .public)")
}
}
}