C-wrapper for Android Trace utility (trace.h, systrace) for Swift.
- 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.
.Package(url: "https://github.com/yuryybk/swift-android-trace.git", from: "1.0.0")
import AndroidSwiftTrace
.....
public func helloWorld() {
beginNativeTraceSection("Hello")
....
endNativeTraceSection()
}
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
This project is licensed under the Apache 2.0 - see the LICENSE.md file for details