Crates.io | microprofile |
lib.rs | microprofile |
version | 0.2.1 |
source | src |
created_at | 2019-03-10 20:26:46.370819 |
updated_at | 2019-08-15 15:46:12.632395 |
description | microprofile is a small library for profiling and optimizing multithreaded programs. |
homepage | https://github.com/jonasmr/microprofile-rust/ |
repository | https://github.com/jonasmr/microprofile-rust.git |
max_upload_size | |
id | 119922 |
size | 1,309,049 |
microprofile-rust is a profiler for profiling and optimizing multithreaded game code
Its a rust port of microprofile:
Which in turn depends on the excellent distorm project
Add microprofile as a dependency:
[dependencies]
microprofile = "0.2.1"
microprofile is meant to be called from a game engine every frame.
to do this you call microprofile::flip
every frame.
If your program is not framebased, you can use microprofile::start_auto_flip(delay_in_ms)
and microprofile::stop_auto_flip()
, which will make microprofile call this function itself every delay_in_ms
ms.
To time some code, you insert a scope in your program
microprofile::scope!("group-name", "timer-name");
All of microprofile-rust's functions are available as macros. Use the feature "disabled" to fully disable all the macros, and remove all the microprofile code instrumentation
[dependencies.microprofile]
version = "0.2.1"
features = ["disabled"]
As of version 0.2.1 only a subset of microprofile is supported:
The following features are not supported:
Please see the microprofile documentation : https://github.com/jonasmr/microprofile