|
Monitoring System 0.1.0
System resource monitoring with pluggable collectors and alerting
|
File storage backend for metrics snapshots. More...
#include <storage_backends.h>


Public Member Functions | |
| file_storage_backend () | |
| file_storage_backend (const storage_config &config) | |
| common::Result< bool > | store (const metrics_snapshot &snapshot) override |
| common::Result< metrics_snapshot > | retrieve (size_t index) override |
| common::Result< std::vector< metrics_snapshot > > | retrieve_range (size_t start, size_t count) override |
| size_t | size () const override |
| size_t | capacity () const override |
| common::Result< bool > | flush () override |
| common::Result< bool > | clear () override |
| std::unordered_map< std::string, size_t > | get_stats () const override |
Public Member Functions inherited from kcenon::monitoring::snapshot_storage_backend | |
| virtual | ~snapshot_storage_backend ()=default |
Private Attributes | |
| storage_config | config_ |
| std::deque< metrics_snapshot > | snapshots_ |
| std::mutex | mutex_ |
File storage backend for metrics snapshots.
Definition at line 123 of file storage_backends.h.
|
inline |
Definition at line 125 of file storage_backends.h.
|
inlineexplicit |
Definition at line 127 of file storage_backends.h.
|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 170 of file storage_backends.h.
References config_, and kcenon::monitoring::storage_config::max_capacity.
Referenced by TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 179 of file storage_backends.h.
References mutex_, and snapshots_.
Referenced by TEST_F(), and TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 174 of file storage_backends.h.
Referenced by TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 185 of file storage_backends.h.
References config_, kcenon::monitoring::storage_config::max_capacity, mutex_, and snapshots_.
Referenced by TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 142 of file storage_backends.h.
References mutex_, kcenon::monitoring::not_found, and snapshots_.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 152 of file storage_backends.h.
References mutex_, and snapshots_.
Referenced by TEST_F(), TEST_F(), and TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 165 of file storage_backends.h.
References mutex_, and snapshots_.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
inlineoverridevirtual |
Implements kcenon::monitoring::snapshot_storage_backend.
Definition at line 130 of file storage_backends.h.
References config_, kcenon::monitoring::storage_config::max_capacity, mutex_, and snapshots_.
Referenced by TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

|
private |
Definition at line 194 of file storage_backends.h.
Referenced by capacity(), get_stats(), and store().
|
mutableprivate |
Definition at line 196 of file storage_backends.h.
Referenced by clear(), get_stats(), retrieve(), retrieve_range(), size(), and store().
|
private |
Definition at line 195 of file storage_backends.h.
Referenced by clear(), get_stats(), retrieve(), retrieve_range(), size(), and store().