auto_tuple¶
-
template<typename ...
Types
>
classauto_tuple
: public tim::auto_base_bundle<TIMEMORY_API, component_tuple<>, auto_tuple<Types...>>, public tim::concepts::stack_wrapper¶ This is a variadic component wrapper where all components are allocated on the stack and cannot be disabled at runtime. This bundler has the lowest overhead. Accepts unlimited number of template parameters. The constructor starts the components, the destructor stops the components.
using bundle_t = tim::auto_tuple<wall_clock, cpu_clock, peak_rss>; void foo() { auto bar = bundle_t("foo"); // ... }
- tparam Types
Specification of the component types to bundle together
The above code will record wall-clock, cpu-clock, and peak-rss. The intermediate storage will happen on the stack and when the destructor is called, it will add itself to the call-graph