Expand description
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 load_website() {
start_trace(&c"step1");
step1();
finish_trace();
start_trace(&CString::new("step2").unwrap());
step2();
finish_trace();
}
start_trace(&c"LoadingWebsite");
load_website();
finish_trace();Structs§
Traits§
Functions§
- finish_
trace - Finishes the most recently started trace span
- start_
trace - trace_
metric_ saturating - Logs a count trace event with a name and an integer count, using saturating conversion to
i64. - trace_
metric_ saturating_ str - Logs a count trace event with a
&strname and an integer count, using saturating conversion toi64. - trace_
metric_ str - Logs a count trace event with a
&strname and an integer count that can be converted toi64.