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.
66 explicit Phase(std::string name) : m_name{std::move(name)}
83 Phase(std::string name, std::string source, std::uint32_t lineno, std::string caller)
84 : m_name{std::move(name)}
87 enter(std::move(source), lineno, std::move(caller));
112 : m_name{std::move(other.m_name)}
113 , m_entered{std::exchange(other.m_entered,
bool{})}
114 , m_handle{std::exchange(other.m_handle,
nullptr)}
127 m_name = std::move(rhs.m_name);
128 m_handle = std::exchange(rhs.m_handle,
nullptr);
129 m_entered = std::exchange(rhs.m_entered,
bool{});
147 leave(__FILE__, __LINE__, __func__);
164 auto enter(std::string source, std::uint32_t lineno, std::string caller) ->
void
184 auto leave(std::string source, std::uint32_t lineno, std::string caller) ->
void
194 std::string m_name{
"BACTRIA_GENERIC_PHASE"};
196 bool m_entered{
false};
212 #define bactria_Phase(name) \
213 ::bactria::metrics::Phase \
215 name, __FILE__, __LINE__, __func__ \
auto leave(std::string source, std::uint32_t lineno, std::string caller) -> void
Leave the phase.
Definition: Phase.hpp:184
auto create_phase(char const *name) noexcept
Creates a plugin-specific phase handle.
Definition: Plugin.hpp:307
auto activated() -> bool
Checks for an active metrics plugin.
Definition: Plugin.hpp:58
auto operator=(Phase &&rhs) -> Phase &
The move assignment operator.
Definition: Phase.hpp:125
auto destroy_phase(void *phase_handle) noexcept
Destroys a plugin-specific phase handle.
Definition: Plugin.hpp:322
Phase(std::string name, std::string source, std::uint32_t lineno, std::string caller)
The entering constructor.
Definition: Phase.hpp:83
auto operator=(const Phase &) -> Phase &=delete
The copy assignment operator (deleted).
Phase()=default
The default constructor.
~Phase()
The destructor.
Definition: Phase.hpp:142
Phase(std::string name)
The non-entering constructor.
Definition: Phase.hpp:66
The phase class.
Definition: Phase.hpp:42
auto leave_phase(void *phase_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept
Plugin-specific phase leaving.
Definition: Plugin.hpp:352
auto enter(std::string source, std::uint32_t lineno, std::string caller) -> void
Enter the phase.
Definition: Phase.hpp:164
Phase(Phase &&other)
The move constructor.
Definition: Phase.hpp:111
bactria-internal handling of metrics plugins.
auto enter_phase(void *phase_handle, char const *source, std::uint32_t lineno, char const *caller) noexcept
Plugin-specific phase entering.
Definition: Plugin.hpp:335