Stores the Prometheus statistics variables.
More...
#include <Statistics.h>
|
virtual void | Initialize () |
| Initializes all statistics objects.
|
|
void | addRecentProject (std::string url) |
| Add a recently added project. More...
|
|
void | addRecentVulnerability (std::string vulnCode) |
| Add a recently added vulnerability. More...
|
|
void | synchronize (std::string file) |
| Regularly synchronizes the statistics to the passed file. More...
|
|
void | writeToFile (std::string file) |
| Write the value of the statistics to the given file. More...
|
|
void | readFromFile (std::string file) |
| Reads the values of the statistics from the passed file. More...
|
|
|
prometheus::Family< prometheus::Counter > * | requestCounter |
|
prometheus::Family< prometheus::Counter > * | methodCounter |
|
prometheus::Family< prometheus::Counter > * | languageCounter |
|
prometheus::Family< prometheus::Counter > * | jobCounter |
|
prometheus::Family< prometheus::Gauge > * | latestRequest |
|
prometheus::Family< prometheus::Counter > * | vulnCounter |
|
prometheus::Family< prometheus::Gauge > * | recentProjects |
|
prometheus::Family< prometheus::Gauge > * | recentVulns |
|
std::string | myIP |
|
bool | newRequest |
|
|
prometheus::Exposer * | exposer |
|
std::shared_ptr< prometheus::Registry > | registry |
|
std::queue< prometheus::Gauge * > | recentProjectsQueue |
|
std::queue< prometheus::Gauge * > | recentVulnsQueue |
|
Stores the Prometheus statistics variables.
◆ addRecentProject()
void Statistics::addRecentProject |
( |
std::string |
url | ) |
|
Add a recently added project.
- Parameters
-
url | The url of the project added. |
◆ addRecentVulnerability()
void Statistics::addRecentVulnerability |
( |
std::string |
vulnCode | ) |
|
Add a recently added vulnerability.
- Parameters
-
vulnCode | The vulnerability code of the vulnerability added. |
◆ readFromFile()
void Statistics::readFromFile |
( |
std::string |
file | ) |
|
Reads the values of the statistics from the passed file.
- Parameters
-
file | The file to read the statistics from. |
◆ synchronize()
void Statistics::synchronize |
( |
std::string |
file | ) |
|
Regularly synchronizes the statistics to the passed file.
- Parameters
-
file | The file to write the statistic to. |
◆ writeToFile()
void Statistics::writeToFile |
( |
std::string |
file | ) |
|
Write the value of the statistics to the given file.
- Parameters
-
file | The file to write the statistics to. |
The documentation for this class was generated from the following files:
- SearchSECODatabaseAPI/General/Statistics.h
- SearchSECODatabaseAPI/General/Statistics.cpp