Added hashrate to reports.

This commit is contained in:
XMRig 2017-09-01 03:45:08 +03:00
parent 30dd7d6fe4
commit 1651b041de
7 changed files with 99 additions and 7 deletions

View file

@ -28,6 +28,9 @@
#include "jansson.h"
class Hashrate;
class ApiState
{
public:
@ -35,16 +38,21 @@ public:
~ApiState();
const char *get(const char *url, size_t *size) const;
void tick(const Hashrate *hashrate);
private:
const char *finalize(json_t *reply, size_t *size) const;
void genId();
void getHashrate(json_t *reply) const;
void getIdentify(json_t *reply) const;
void getMiner(json_t *reply) const;
char m_id[17];
char m_workerId[128];
double *m_hashrate;
double m_highestHashrate;
double m_totalHashrate[3];
int m_threads;
mutable char m_buf[4096];
};