Skip to content

Latest commit

 

History

History
43 lines (24 loc) · 999 Bytes

README.md

File metadata and controls

43 lines (24 loc) · 999 Bytes

swift-android-trace

C-wrapper for Android Trace utility (trace.h, systrace) for Swift.

Getting started

  • Read Android Native Trace.
  • This tool works only on Android API 23 and higher (in accordance with Tracing API). For Android API lower than 23 it doesn't give any effect.

Installation

.Package(url: "https://github.com/yuryybk/swift-android-trace.git", from: "1.0.0")

Usage

Code Example

import AndroidSwiftTrace

.....

public func helloWorld() {
   beginNativeTraceSection("Hello")
   
   ....
   
   endNativeTraceSection()
}

Generate report

Run application. To get .html report run the next command and play with application:

python $ANDROID_NDK/platform-tools/systrace/systrace.py --time=<trace_duration_seconds> --app=<app_package> -o <output_dir> app

License

This project is licensed under the Apache 2.0 - see the LICENSE.md file for details