#include <PotRegistry.h>
Classes | |
| struct | InstanceRecord |
| struct | TypeStats |
Public Types | |
| using | Clock = IPotRegistry::Clock |
| using | TimePoint = IPotRegistry::TimePoint |
| Public Types inherited from eonc::IPotRegistry | |
| using | Clock = std::chrono::system_clock |
| using | TimePoint = Clock::time_point |
Public Member Functions | |
| PotRegistry ()=default | |
| ~PotRegistry () override | |
| void | reset () |
| uint64_t | on_created (PotType t) noexcept override |
| void | on_destroyed (uint64_t id, PotType t, size_t force_calls, TimePoint created_at) override |
| void | on_force_call (PotType t) noexcept override |
| size_t | type_force_calls (PotType t) const noexcept |
| size_t | total_force_calls () const noexcept |
| size_t | type_alive (PotType t) const noexcept |
| void | write_summary (const std::string &path="_potcalls.json") const |
| Public Member Functions inherited from eonc::IPotRegistry | |
| virtual | ~IPotRegistry () |
| std::shared_ptr< RegistryLifetime > | lifetime () const |
| IPotRegistry (const IPotRegistry &)=delete | |
| IPotRegistry & | operator= (const IPotRegistry &)=delete |
Static Public Member Functions | |
| static PotRegistry & | get () noexcept |
| Process-lifetime singleton. | |
Private Attributes | |
| std::array< TypeStats, magic_enum::enum_count< PotType >()> | m_type_stats {} |
| std::mutex | m_records_mutex |
| std::vector< InstanceRecord > | m_records |
| std::atomic< uint64_t > | m_next_id {1} |
Additional Inherited Members | |
| Protected Member Functions inherited from eonc::IPotRegistry | |
| IPotRegistry ()=default | |
| Protected Attributes inherited from eonc::IPotRegistry | |
| std::shared_ptr< RegistryLifetime > | lifetime_ |
Definition at line 62 of file PotRegistry.h.
Definition at line 64 of file PotRegistry.h.
Definition at line 65 of file PotRegistry.h.
|
default |
|
inlineoverride |
Definition at line 90 of file PotRegistry.h.
|
staticnoexcept |
Process-lifetime singleton.
The instance is allocated on the heap and never destroyed, so Potential destructors can still record teardown after C++ static destruction.
Definition at line 51 of file PotRegistry.cpp.
|
nodiscardoverridevirtualnoexcept |
Implements eonc::IPotRegistry.
Definition at line 72 of file PotRegistry.cpp.
|
overridevirtual |
Implements eonc::IPotRegistry.
Definition at line 79 of file PotRegistry.cpp.
|
overridevirtualnoexcept |
Implements eonc::IPotRegistry.
Definition at line 89 of file PotRegistry.cpp.
| void eonc::PotRegistry::reset | ( | ) |
Definition at line 61 of file PotRegistry.cpp.
|
nodiscardnoexcept |
Definition at line 99 of file PotRegistry.cpp.
|
nodiscardnoexcept |
Definition at line 107 of file PotRegistry.cpp.
|
nodiscardnoexcept |
Definition at line 94 of file PotRegistry.cpp.
| void eonc::PotRegistry::write_summary | ( | const std::string & | path = "_potcalls.json" | ) | const |
Definition at line 112 of file PotRegistry.cpp.
|
private |
Definition at line 86 of file PotRegistry.h.
|
private |
Definition at line 84 of file PotRegistry.h.
|
private |
Definition at line 83 of file PotRegistry.h.
Definition at line 81 of file PotRegistry.h.