#open-harmony #harmony-os #tracing

hitrace

Safe bindings to the HiTrace tracing system of OpenHarmony

5 releases

0.1.4 Apr 20, 2024
0.1.3 Apr 19, 2024
0.1.2 Apr 19, 2024
0.1.1 Apr 19, 2024
0.1.0 Apr 19, 2024

#9 in #open-harmony

Download history 439/week @ 2024-10-13 527/week @ 2024-10-20 416/week @ 2024-10-27 487/week @ 2024-11-03 415/week @ 2024-11-10 433/week @ 2024-11-17 329/week @ 2024-11-24 376/week @ 2024-12-01 464/week @ 2024-12-08 510/week @ 2024-12-15 346/week @ 2024-12-22 223/week @ 2024-12-29 590/week @ 2025-01-05 503/week @ 2025-01-12 647/week @ 2025-01-19 484/week @ 2025-01-26

2,257 downloads per month

Apache-2.0

6KB
63 lines

HiTrace

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

Development

Contributions are welcome.

License

This project is licensed under the Apache-2.0 license, matching the license of OpenHarmony. See LICENSE for details.


lib.rs:

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();

Dependencies