Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Embedded-Profiling
A lightweight framework for profiling functions, geared towards
no-std
embedded environments.
Documentation
Usage
Initialization is very similar
to how the log
crate is initialized. By default, there is a
no-op profiler that does nothing until you call set_profiler
.
Once your profiler has been installed, your profiling
functionality will be in use.
You can manually start & end your snapshot:
let start = start_snapshot;
// (...) some expensive computation
let snapshot = end_snapshot;
// Optionally, log it
log_snapshot;
Or profile some code in a closure:
;
profile
With a Procedural Macro
With the proc-macros
feature enabled, you can simply annotate
the target function with the procedural macro profile_function
.
Note that you must first set your profiler with theset_profiler
function.
Example Project & DWT Timer Implementation
A working example program on a feather_m4
development board is provided
in the embedded-profiling
github repo.
The embedded-profiling
library also provides a basic timer implementation
using the DWT/systick functionality found in most Cortex-M microcontrollers.
The implementation is heavily inspired (read: copied and lightly modified)
from the RTIC
dwt-systick-monotonic
crate.
License
This code is licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.