Latest 0.3.0
Homepage https://github.com/perflabs/PerfSDK
License GPL3
Platforms ios 9.0
Authors

Version
License
Platform

PerfSDK times and records status codes from external networking requests and sends them to the Perf data pipeline.

This is an experimental integration and is stable, here are the caveats for this integration

  • URLs may not normalize correctly

Install

  1. To install it via CocoaPods, add this line to your Podfile. Latest version is swift 3.0 to use swift 2.3 please use version 2.1 of the Perf SDK.

    pod "PerfSDK"
  2. To install with Carthage, add this line to your Cartfile

    github "perflabs/PerfSDK"
  3. In your AppDelegate.swift file add the following import

    import PerfSDK
  4. If you don’t use any networking library, add this line into didFinishLaunchingWithOptions delegate in your AppDelegate.swift file

    Perf.sharedInit("PERF_API_KEY")
  5. If you’re using Alamofire, use this line instead

    Perf.sharedInit("PERF_API_KEY", configuration:  Alamofire.Manager.sharedInstance.session.configuration)

Configuration Options

  1. If you use NSURLSession, you’ll need to add these lines anywhere you instantiate a new NSURLSession

    let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
    Perf.registerConfiguration(configuration)
    let defaultSession = NSURLSession(configuration: configuration)
  2. If you use a lot of external services and only want to monitor specific domains, you can specify a list of domains after the sharedInit call

    Perf.shared?.whiteListDomains = ["perf.sh"]

Latest podspec

{
    "name": "PerfSDK",
    "version": "0.3.0",
    "summary": "PerfSDK provides analytics on api timing for iOS client apps",
    "description": "PerfSDK seamlessy monitors the API requests your app makes and sends timing data to perf.sh to help you idenify any slow endpoints your users might be experiencing.",
    "homepage": "https://github.com/perflabs/PerfSDK",
    "license": {
        "type": "GPL3",
        "file": "LICENSE"
    },
    "authors": {
        "Jonathan Grana": "[email protected]"
    },
    "source": {
        "git": "https://github.com/perflabs/PerfSDK.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "Sources/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This