Contents

icanzilb/timelanecombine

**TimelaneCombine** provides a Combine bindings for profiling Combine code with the Timelane Instrument.

`lane(_:filter:)`

Use lane("Lane name") to send data to both the subscriptions and events lanes in the Timelane Instrument.

lane("Lane name", filter: [.subscriptions]) sends begin/completion events to the Subscriptions lane. Use this syntax if you only want to observe concurrent subscriptions.

lane("Lane name", filter: [.events]) sends events and values to the Events lane. Use this filter if you are only interested in values a subscription would emit (e.g. for example subjects).

Additionally you can transform the values logged in Timelane by using the optional transformValue trailing closure:

lane("Lane name") { value in
  return "Value: \(value)"
}

In case you are using @Published you can easily log that subscription to Timelane by using replacing it with:

@PublishedOnLane("My Lane") var property: String

Installation

Swift Package Manager

I . Automatically in Xcode:

- Click File > Swift Packages > Add Package Dependency... - Use the package URL https://github.com/icanzilb/TimelaneCombine to add TimelaneCombine to your project.

II . Manually in your Package.swift file add:

.package(url: "https://github.com/icanzilb/TimelaneCombine", from: "2.0.0")

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate TimelaneCombine into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'TimelaneCombine', '~> 2.0'

Demo

The Timelane package contains a demo app at: https://github.com/icanzilb/timelane.

License

Copyright (c) Marin Todorov 2020 This package is provided under the MIT License.

Package Metadata

Repository: icanzilb/timelanecombine

Default branch: main

README: README.md