bactria
0.0.1
The bactria library is a header-only C++14 library for profiling and tracing.
|
Go to the documentation of this file.
31 #include <type_traits>
48 template<
typename... TValues>
75 template<
typename TFunc>
80 std::is_constructible<
82 std::reference_wrapper<
typename std::remove_reference<TFunc>::type>>::value,
98 template<
typename TFunc>
102 std::is_constructible<
103 std::function<
void(
void)>,
104 std::reference_wrapper<
typename std::remove_reference<TFunc>::type>>::value,
119 template<std::
size_t TIndex>
122 static_assert(TIndex < std::tuple_size<decltype(m_values)>::value,
"Data index out of bounds");
123 return std::get<TIndex>(m_values);
137 template<std::
size_t TIndex,
typename TValue>
140 static_assert(TIndex < std::tuple_size<decltype(m_values)>::value,
"Data index out of bounds");
141 std::get<TIndex>(m_values) = value;
156 template<std::size_t... TIndices>
159 auto const r =
make_report(std::move(name), std::get<TIndices>(m_values)...);
164 std::tuple<TValues...> m_values{std::make_tuple(TValues{}...)};
Class for dynamic recording of Incidents.
Definition: IncidentRecorder.hpp:49
auto record_step(TFunc &&f, std::enable_if_t< std::is_constructible< std::function< void(record_t &)>, std::reference_wrapper< typename std::remove_reference< TFunc >::type >>::value, int >=0)
Perform a recording step.
Definition: IncidentRecorder.hpp:76
auto load()
Load a value.
Definition: IncidentRecorder.hpp:120
auto submit_report(std::string name) const
Generate report from stored Incidents.
Definition: IncidentRecorder.hpp:157
auto store(TValue &&value)
Record a value.
Definition: IncidentRecorder.hpp:138
auto make_report(std::string name, TIncidents &&... incidents) -> Report< TIncidents... >
Create a Report from several Incidents.
Definition: Report.hpp:190
auto record_step(TFunc &&f, std::enable_if_t< std::is_constructible< std::function< void(void)>, std::reference_wrapper< typename std::remove_reference< TFunc >::type >>::value, int >=0)
Perform a recording step without loading or storing data.
Definition: IncidentRecorder.hpp:99