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.
53 template<
typename... TIncidents>
72 Report(std::string name, TIncidents&&... incidents)
73 : m_name{std::move(name)}
74 , m_incidents{std::forward<TIncidents>(incidents)...}
86 Report(
Report const& other) : m_name{other.m_name}, m_incidents{other.m_incidents}
101 m_incidents = rhs.m_incidents;
114 : m_name{std::move(other.m_name)}
115 , m_incidents{std::move(other.m_incidents)}
129 m_name = std::move(rhs.m_name);
130 m_incidents = std::move(rhs.m_incidents);
153 using namespace std::placeholders;
154 using TTuple = decltype(m_incidents);
158 submit_incidents(std::make_index_sequence<std::tuple_size<TTuple>::value>{});
164 template<std::size_t... Is>
165 auto submit_incidents(std::index_sequence<Is...>)
const
167 auto dummy = {(submit_incident(std::get<Is>(m_incidents)), 0)...};
170 template<
typename TInc
ident>
171 auto submit_incident(TIncident
const& incident)
const
176 std::string m_name{
"BACTRIA_REPORT"};
177 std::tuple<TIncidents...> m_incidents{};
189 template<
typename... TIncidents>
192 return Report<TIncidents...>{std::move(name), std::forward<TIncidents>(incidents)...};
bactria-internal handling of reports plugins.
auto operator=(Report &&rhs) noexcept -> Report &
Move-assignment operator.
Definition: Report.hpp:127
The report class.
Definition: Incident.hpp:34
Report(Report const &other)
Copy constructor.
Definition: Report.hpp:86
auto create_report(char const *name)
Creates a plugin-specific report handle.
Definition: Plugin.hpp:323
auto activated() -> bool
Checks for an active metrics plugin.
Definition: Plugin.hpp:58
auto record_value(void *report_handle, char const *key, bool value) -> void
Plugin-specific boolean recording.
Definition: Plugin.hpp:364
Report(Report &&other) noexcept
Move constructor.
Definition: Report.hpp:113
auto destroy_report(void *report_handle) noexcept
Destroys a plugin-specific report handle.
Definition: Plugin.hpp:338
auto operator=(Report const &rhs) -> Report &
Copy-assignment operator.
Definition: Report.hpp:98
auto submit() const
Save the report.
Definition: Report.hpp:151
Report()=default
Default constructor.
auto write_report(void *report_handle)
Plugin-specific report writing.
Definition: Plugin.hpp:351
~Report()
Destructor.
Definition: Report.hpp:137
auto make_report(std::string name, TIncidents &&... incidents) -> Report< TIncidents... >
Create a Report from several Incidents.
Definition: Report.hpp:190
Report(std::string name, TIncidents &&... incidents)
Constructor.
Definition: Report.hpp:72