Skip to main content

Crate timetrap

Crate timetrap 

Source

Macros§

trap
trap! method to wrap your code with to measure the time taken for the wrapped section execution.
trap_mem
trap_mem! method to wrap your code with to measure the time taken and the memory consumed for the wrapped section execution.

Enums§

Colors
MemUnits

Functions§

measure_time
Measures execution time and prints a timing line.
measure_time_and_memory
Measures execution time and memory/swap deltas.
measure_time_and_memory_with_color
Measures execution time and memory/swap deltas with colorized output.
measure_time_with_color
Measures execution time and prints a colorized timing line.