hitrace 0.1.0

Safe bindings to the HiTrace tracing system of OpenHarmony
Documentation

HiTrace

Safe bindings for the HiTrace tracing system on OpenHarmony. This crate does nothing if not compiled for OpenHarmony (target_env = ohos).

Usage

HiTrace allows tracing Spans in a synchronous and stack based fashion.

Examples

# fn OH_HiTrace_StartTrace(_: * const core::ffi::c_char) {}
# fn OH_HiTrace_FinishTrace() {}
# fn step1() {}
# fn step2() {}
fn load_website() {
start_trace(c"step1");
step1();
finish_trace();
start_trace(CString::new("step2").unwrap())
step2();
}
start_trace(c"LoadingWebsite");
load_website();
finish_trace();