Skip to content

readdle/swift-android-trace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

C-wrapper for Trace (systrace) compatible with Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •