Added results statistics to API.
This commit is contained in:
parent
1651b041de
commit
9e9cddedc5
21 changed files with 265 additions and 57 deletions
|
@ -29,6 +29,7 @@
|
|||
#include <uv.h>
|
||||
|
||||
|
||||
#include "api/Results.h"
|
||||
#include "interfaces/IJobResultListener.h"
|
||||
#include "interfaces/IStrategyListener.h"
|
||||
|
||||
|
@ -52,7 +53,7 @@ protected:
|
|||
void onJob(Client *client, const Job &job) override;
|
||||
void onJobResult(const JobResult &result) override;
|
||||
void onPause(IStrategy *strategy) override;
|
||||
void onResultAccepted(Client *client, int64_t seq, uint32_t diff, uint64_t ms, const char *error) override;
|
||||
void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override;
|
||||
|
||||
private:
|
||||
constexpr static int kTickInterval = 1 * 1000;
|
||||
|
@ -65,8 +66,7 @@ private:
|
|||
const Options *m_options;
|
||||
IStrategy *m_donate;
|
||||
IStrategy *m_strategy;
|
||||
uint64_t m_accepted;
|
||||
uint64_t m_rejected;
|
||||
Results m_results;
|
||||
uv_timer_t m_timer;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue