Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
Instruments/ActorInstruments/ActorInstruments.xcodeproj/xcuserdata
Instruments/ActorInstruments/build/
Instruments/ActorInstruments/ActorInstruments.xcodeproj/project.xcworkspace/xcuserdata
Instruments/ActorInstruments/build

Samples/swift-distributed-actors-samples.xcodeproj

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import os.log
import os.signpost

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
public struct OSSignpostActorInstrumentation: ActorInstrumentation {
static let subsystem: StaticString = "com.apple.actors"
Expand Down Expand Up @@ -49,8 +49,8 @@ public struct OSSignpostActorInstrumentation: ActorInstrumentation {
// MARK: Instrumentation: Actor Lifecycle

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
extension OSSignpostActorInstrumentation {
static let actorSpawnedStartFormat: StaticString =
Expand Down Expand Up @@ -142,8 +142,8 @@ extension OSSignpostActorInstrumentation {
// MARK: Instrumentation: Actor Messages

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
extension OSSignpostActorInstrumentation {
// ==== ----------------------------------------------------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import os.log
import os.signpost

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
public struct OSSignpostActorTransportInstrumentation: ActorTransportInstrumentation {
static let subsystem: StaticString = "com.apple.actors"
Expand All @@ -46,8 +46,8 @@ public struct OSSignpostActorTransportInstrumentation: ActorTransportInstrumenta
// MARK: Instrumentation: Serialization

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
extension OSSignpostActorTransportInstrumentation {
static let actorMessageSerializeStartPattern: StaticString =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct OSSignpostInstrumentationProvider: ActorSystemInstrumentationProvi
public init() {}

public var actorInstrumentation: ((AnyObject, ActorAddress) -> ActorInstrumentation)? {
if #available(OSX 10.14, *) {
if #available(OSX 10.14, iOS 12.0, *) {
// TODO: how to guard in iOS etc here?
return OSSignpostActorInstrumentation.init
} else {
Expand All @@ -27,15 +27,15 @@ public struct OSSignpostInstrumentationProvider: ActorSystemInstrumentationProvi
}

public var actorTransportInstrumentation: (() -> ActorTransportInstrumentation)? {
if #available(OSX 10.14, *) {
if #available(OSX 10.14, iOS 12.0, *) {
return OSSignpostActorTransportInstrumentation.init
} else {
return nil
}
}

public var receptionistInstrumentation: (() -> ReceptionistInstrumentation)? {
if #available(OSX 10.14, *) {
if #available(OSX 10.14, iOS 12.0, *) {
return OSSignpostReceptionistInstrumentation.init
} else {
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import os.log
import os.signpost

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
public struct OSSignpostReceptionistInstrumentation: ReceptionistInstrumentation {
static let subsystem: StaticString = "com.apple.actors"
Expand All @@ -40,8 +40,8 @@ public struct OSSignpostReceptionistInstrumentation: ReceptionistInstrumentation
// MARK: Instrumentation: Receptionist

@available(OSX 10.14, *)
@available(iOS 10.0, *)
@available(tvOS 10.0, *)
@available(iOS 12.0, *)
@available(tvOS 12.0, *)
@available(watchOS 3.0, *)
extension OSSignpostReceptionistInstrumentation {
static let subscribedFormat: StaticString =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ final class ClusterLeaderActionsClusteredTests: ClusteredActorSystemsXCTestCase
}
}

// snapshot(nil) + first nil -> joining
// OR
// snapshot(first joining)
// snapshot(nil) + first nil -> joining
// OR
// snapshot(first joining)
// are both legal
eventsOnFirstSub.shouldContain(.membershipChange(.init(node: secondNode, fromStatus: nil, toStatus: .joining)))
eventsOnFirstSub.shouldContain(.membershipChange(.init(node: first.cluster.uniqueNode, fromStatus: .joining, toStatus: .up)))
Expand Down