Coz profiler Swift wrapper/bindings

Related tags

Utility swift-coz
Overview

Swift Coz (Linux Only)

Coz profiler Swift wrapper/bindings.

This is a Swift wrapper around the Coz profiler here: https://github.com/plasma-umass/coz inspired from https://github.com/urjitbhatia/cozgo (method names, example and this README.md)

Code Usage

Coz Call Equivalent Swift Coz Call Description
COZ_BEGIN("name") cozBegin("name") Begin a latency profiling block identified by the name
COZ_END("name") cozEnd("name") End a latency profiling block identified by the name
COZ_PROGRESS() cozProgress() Specify a progress point within a block of work
COZ_PROGRESS() cozProgressNamed("name") Specify a named progress point within a block of work

For background on causal profiling, see

Paper: http://www.sigops.org/s/conferences/sosp/2015/current/2015-Monterey/printable/090-curtsinger.pdf

Blog: https://morsmachine.dk/causalprof

Running/Usage - Coz works only on Linux

let package = Package(
  name: "SomePackage",
  dependencies: [
    .package(
      url: "https://github.com/funcmike/swift-coz.git", .branch("main")
    )
  ],
  targets: [
    .executableTarget(
      name: "SomeTarget",
      dependencies: [
        .product(name: "Coz", package: "swift-coz"),
      ]
    ),
  ]
  • Import Swift Coz: import Coz
  • Call the Coz wrappers in your application
  • Build your swift binary with debug symbols: swift build -c debug and Check directory with binary: swift build -c debug --show-bin-path
  • Run your application with Coz: coz run --- /path/to/yourSwiftBinary
  • Let the application run for a while (you might want to run some load test etc, so that the profiler can pick up usage data)
  • By default, Coz will create a file called profile.coz
  • Use the Coz viewer to analyze the profile (run: node's http-server in viewer directory of Coz repository https://github.com/plasma-umass/coz)
You might also like...
Dungeon Crawl: Stone Soup iOS Webtiles wrapper

dcss-ios Dungeon Crawl: Stone Soup iOS Webtiles wrapper Summary This project aims to make DCSS webtiles a joy to play on any iOS device without an ext

Contacts wrapper for iOS 9 or upper with Objective-C

ContactsWrapper Contacts wrapper for iOS 9 or upper with Objective-C. For the information translated to Russian, take a look at this link. Requirement

StoredIn is a simple property wrapper library to store any value in anywhere

StoredIn StoredIn is a simple property wrapper library to store any value in anywhere. Installation Please use the Swift Package Manager. dependencies

`Republished` is a property wrapper enabling nested ObservableObjects in SwiftUI.

Republished The @Republished proprty wrapper allows an ObservableObject nested within another ObservableObject to naturally notify SwiftUI of changes.

BCSwiftTor - Opinionated pure Swift controller for Tor, including full support for Swift 5.5 and Swift Concurrency

BCSwiftTor Opinionated pure Swift controller for Tor, including full support for

Swift Markdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.

Swift Markdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer documentation.

Swift-DocC is a documentation compiler for Swift frameworks and packages aimed at making it easy to write and publish great developer docum

Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. (Pure Swift, Supports Linux)

SwiftFoundation Cross-Platform, Protocol-Oriented Programming base library to complement the Swift Standard Library. Goals Provide a cross-platform in

Swift - ✏️Swift 공부 저장소✏️

Swift 스위프트의 기초 1. Swift의 기본 2. 변수와 상수 [3. 데이터 타입 기본] [4. 데이터 타입 고급] 5. 연산자 6. 흐름 제어 7. 함수 8. 옵셔널 객체지향 프로그래밍과 스위프트 9. 구조체와 클래스 10. 프로퍼티와 메서드 11. 인스턴스 생

Owner
Krzysztof Majk
Krzysztof Majk
MLIR Bindings for Swift

MLIR Bindings for Swift This project intends to make MLIR APIs accessible from Swift via the MLIR C Bindings. Usage The best reference for how to use

CIRCT 24 Sep 8, 2021
Swift-ndi - Swift wrapper around NewTek's NDI SDK

swift-ndi Swift wrapper around NewTek's NDI SDK. Make sure you extracted latest

Alessio Nossa 12 Dec 29, 2022
💡 A light Swift wrapper around Objective-C Runtime

A light wrapper around Objective-C Runtime. What exactly is lumos? lumos as mentioned is a light wrapper around objective-c runtime functions to allow

Suyash Shekhar 139 Dec 19, 2022
UTIKit is an UTI (Uniform Type Identifier) wrapper for Swift.

UTIKit UTIKit is an UTI (Uniform Type Identifier) wrapper for Swift. Features UTIKit is a full featured library including entire UTI functions. Conver

Hiroki Kato 254 Nov 27, 2022
A Swift property wrapper which stores the previous value

swift-with-previous A Swift property wrapper which stores the previous value. The previous value can be get by the projected value $propertyName. impo

IKEDA Sho 3 Feb 22, 2022
Swift wrapper for PuLP module.

SwiftPuLP Wraps Python Linear Programming PuLP module. Requirements Requires PuLP to be installed, and may require PYTHON_LIBRARY environment variable

Michel Tilman 0 Dec 24, 2021
An unofficial wrapper around FSEvent tailored for Swift 5.

EonilFSEvents Eonil 2018 Maintenance. 2019 Maintenance. It's possible to use FSEvents directly in Swift, but it still involves many boilerplate works

eonil 87 Dec 24, 2022
A swift wrapper for NSTimer

Every.Swift - A Convenient NSTimer Wrapper Usage Provided that your class implement TimerManageable protocol you just do: self.every(3.seconds) {

Samhan Salahuddin 271 Apr 14, 2022
A Swift wrapper for URL bookmarks which allow a file to be located regardless of whether it is moved or renamed.

Bookmark A Swift wrapper for URL bookmarks which allow a file to be located regardless of whether it is moved or renamed. This class wraps Swift's URL

Darren Ford 8 Nov 3, 2022
Backports the new @Invalidating property wrapper to older platforms

ViewInvalidating A property wrapper that backports the new @Invalidating property wrapper to older versions of iOS/tvOS/macOS. For more information on

Suyash Srijan 61 Nov 23, 2022