API for stratum server statistics.
Users can pass `--stratum-api` to command line to enable a file called `local/stats` in `--data-api` directory. `local/stats` contains statistics that `StratumServer status` provides but in JSON format. It is currently setup that `local/stats` is updated each time a new job is sent to a worker.
This commit is contained in:
@@ -25,13 +25,14 @@ namespace p2pool {
|
||||
class p2pool_api
|
||||
{
|
||||
public:
|
||||
explicit p2pool_api(const std::string& api_path);
|
||||
p2pool_api(const std::string& api_path, const bool local_stats);
|
||||
~p2pool_api();
|
||||
|
||||
enum class Category {
|
||||
GLOBAL,
|
||||
NETWORK,
|
||||
POOL,
|
||||
LOCAL,
|
||||
};
|
||||
|
||||
void on_stop();
|
||||
@@ -80,6 +81,7 @@ private:
|
||||
std::string m_apiPath;
|
||||
std::string m_networkPath;
|
||||
std::string m_poolPath;
|
||||
std::string m_localPath;
|
||||
|
||||
uv_mutex_t m_dumpDataLock;
|
||||
std::unordered_map<std::string, std::vector<char>> m_dumpData;
|
||||
|
||||
Reference in New Issue
Block a user