Expand description
A simple profiler for Rust applications.
This crate provides a basic profiling utility that can be used to measure the elapsed time of code execution. See the Changelog sub-section below for updates and changes.
The TimeLapse profiler is open-source and can be freely used and modified under the terms of the MIT license.
§Changelog
§[0.1.3] - 2025-06-28
-
Added two new macros:
profile_end_print!()
- Use println! instead of astd::log
instance.profile_end_log!()
- Additional parameter to select the log’sLevel
to use.
See the documentation for usage details.
§[0.1.2] - 2025-06-12
- Added example of usage for the defined macros.
- Added a CHANGELOG.md file
§[0.1.1] - 2025-06-11
- Added
pub use
entries inlib.rs
to simplify usage in calling applications.
§[0.1.0] - 2025-06-10
Initial release
Re-exports§
pub use profiler::TimeLapse;
Modules§
- profiler
- A simple profiler for measuring elapsed time in Rust.
Macros§
- profile_
end - The
profile_end!
macro logs at the info level the elapsed time of the profiling instance created byprofile_start!
. These macros are useful for quick profiling without needing to manually create and manageTimeLapse
instances. - profile_
end_ log - The
profile_end_log!
macro logs the elapsed time of the profiling instance created byprofile_start!
. It allows specifying the log level for the message. This macro is useful for quick profiling without needing to manually create and manageTimeLapse
instances. - profile_
end_ print - The
profile_end_print!
macro prints the elapsed time of the profiling instance created byprofile_start!
. This macro is useful for quick profiling without needing to manually create and manageTimeLapse
instances. - profile_
start - The
profile_start!
macro initializes aTimeLapse
instance to start profiling. It takes an identifier as an argument, which will be instantiated and used to reference the profiler instance.