• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 5 years ago
  • Updated almost 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Timelane + RxSwift

RxTimelane

Timelane Icon

RxTimelane provides RxSwift bindings for profiling RxSwift code with the Timelane Instrument.

Timelane Instrument

Contents:

Usage

Note: To observe the output of using TimelaneCombine you need to install the Timelane Instrument in advance. More information at: http://timelane.tools.

Import the RxTimelane framework in your code:

import RxTimelane

Use the lane(_) operator to profile a subscription via the TimelaneInstrument. Insert lane(_) at the precise spot in your code you'd like to profile like so:

downloadImage(at: url).
  .lane("Download: \(url.path)")
  .assign(to: \.image, on: myImageView)

Then profile your project by clicking Product > Profile in Xcode's main menu.

Select the Timelane Instrument template:

Timelane Instrument Template

Inspect your subscriptions on the timeline:

Timelane Live Recording

For a more detailed walkthrough go to http://timelane.tools.

API Reference

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", transformValue: { value in
  return "Value: \(value)"
})

Installation

Swift Package Manager

I . Automatically in Xcode:

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

II . Manually in your Package.swift file add:

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

CocoaPods

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

pod 'RxTimelane', '~> 2.0'

Carthage

Not supported. More info

Demo

This repo contains a simple demo app. To give it a try open RxTimelaneExample/RxTimelane.xcodeproj and run the "RxTimelaneExample" scheme.

Timelane demo app

License

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

More Repositories

1

EasyAnimation

A Swift library to take the power of UIView.animateWithDuration(_:, animations:...) to a whole new level - layers, springs, chain-able animations and mixing view and layer animations together!
Swift
2,960
star
2

SwiftSpinner

A beautiful activity indicator and modal alert written in Swift (originally developed for my app DoodleDoodle) Using blur effects, translucency, flat and bold design - all iOS 8 latest and greatest
Swift
2,184
star
3

Timelane

Timelane
Swift
706
star
4

TaskQueue

A Task Queue Class developed in Swift (by Marin Todorov)
Swift
681
star
5

UIEffectDesignerView

A native Particle Systems effect view for iOS and OSX powered by QuartzCore
Objective-C
617
star
6

Retry

Haven't you wished for `try` to sometimes try a little harder? Meet `retry`
Swift
498
star
7

EventBlankApp

A free open source iOS app for events or conferences. Read more on the app's webpage:
Swift
291
star
8

MTLog

NSLog replacement for coders!
Objective-C
222
star
9

Breadcrumbs

Bugtracker working off source code
Swift
193
star
10

TimelaneCombine

Timelane + Combine
Swift
168
star
11

PowerUpYourAnimations

Sample code from talks on advanced animations
Swift
118
star
12

DoNilDisturbPlugin

A plugin for your Xcode project that stops you from working outside work hours
Swift
109
star
13

timeui

Profile apps from the command line β€” duration, cpu & memory usage.
Swift
107
star
14

OneShotLocationManager

A replacement class for CLLocationManager for when you want to easily fetch the current device location
Swift
101
star
15

MTPopupWindow

Popup-window style view for Objective-C, which loads contents of an HTML file. Easy one-line usage. Check the readme for example
Objective-C
84
star
16

TimelaneCore

Timelane + Core
Swift
66
star
17

OperationTimelane

Timelane + Operations
Swift
45
star
18

RxSwiftoniOS

Sample code from my dotSwift 2017 talk in Paris
Swift
43
star
19

PackageView

An app that displays Package.swift info
Swift
42
star
20

RealmGitHubSearchRxDemo

The demo app for RxRealm's post on realm.io
Swift
36
star
21

RealmMultiplatformDemo

Demo that shares its model layer across Apple's four platforms
Swift
36
star
22

Advanced-RSS-reader

An example of an RSS reader app for iPhone, full source and comments
Objective-C
34
star
23

MTTestSemaphore

A class to help you create unit tests that test asynchronous methods. You will need this to unit test any class that fetch data from the network, use location, camera, etc.
Objective-C
33
star
24

Unxippity

Unxips quickly Xcode downloads
Swift
32
star
25

Cancellor

Bind multiple cancellables to the lifetime of another object like a view controller.
Swift
32
star
26

RealmNotificationExample

The project for the post demonstrating fine grained notifications on realm.io
Swift
30
star
27

MarkWalkthrough

A SwiftUI package to quickly build app walkthroughs
Swift
27
star
28

HUD

Beautiful alert message/ progress hud component for iOS Objective-C
Objective-C
25
star
29

SafariDownload

Swift package to read Safari's download packages
Swift
8
star
30

CustomInstrument

A custom Xcode instrument based on Timelane
Swift
7
star
31

Fetch-and-parse-JSON

Fetch and parse JSON
Objective-C
7
star
32

ActorBench

Actor vs queue vs lock benchmark
Swift
6
star
33

TimelaneInstrument

Timelane Tools Instrument
5
star
34

StylesDemoApp

A little experiment on styling SwiftUI views
Swift
4
star
35

powerups

cli for dynamic XML includes
Swift
3
star
36

nsspain2020

Demo projects from my talk at NSSpain 2020
Swift
3
star
37

Tracker

Google Analytics iOS shortcut wrapper
3
star
38

TimerApp

Timer App v1
Swift
3
star
39

LogRider

Logs viewer app for mac
Swift
3
star
40

snippetty.io

snippetty.io
HTML
3
star
41

HTTPKit

Task based, promise like syntax, RESTful, HTTP library for iOS and OS X. Built off ConcurrentKit and NSURLSession.
Objective-C
2
star
42

react-native-console-oslog

React Native package to log to Apple's unified log
Objective-C++
2
star
43

rx-marin

rx blog:
HTML
2
star
44

combinebook.com

HTML
2
star
45

ios-animations-by-emails

iOS Animations by Emails newsletter archive
HTML
2
star
46

snippety.io

snippetty.io
1
star
47

swiftconcurrencybook

swiftconcurrencybook.com
CSS
1
star
48

AnagramsGameiPad

The completed source code to "How to create an awesome Anagrams game with UIKit"
Objective-C
1
star
49

Baffle

Ruby
1
star
50

www.timelane.tools

www.timelane.tools
1
star
51

macro-bad-access

Swift
1
star
52

tryCombine

tryCombine blog by Marin Todorov
HTML
1
star
53

Languages

RWDevCon tutorial code
Swift
1
star