mirror of
https://github.com/xmrig/xmrig.git
synced 2025-03-12 09:37:35 +00:00
Merge branch 'master' into dev
This commit is contained in:
commit
d9066dc817
2 changed files with 7 additions and 4 deletions
|
@ -293,13 +293,16 @@ void ApiRouter::getThreads(rapidjson::Document &doc) const
|
|||
const std::vector<xmrig::IThread *> &threads = m_controller->config()->threads();
|
||||
rapidjson::Value list(rapidjson::kArrayType);
|
||||
|
||||
size_t i = 0;
|
||||
for (const xmrig::IThread *thread : threads) {
|
||||
rapidjson::Value value = thread->toAPI(doc);
|
||||
|
||||
rapidjson::Value hashrate(rapidjson::kArrayType);
|
||||
hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::ShortInterval)), allocator);
|
||||
hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::MediumInterval)), allocator);
|
||||
hashrate.PushBack(normalize(hr->calc(thread->index(), Hashrate::LargeInterval)), allocator);
|
||||
hashrate.PushBack(normalize(hr->calc(i, Hashrate::ShortInterval)), allocator);
|
||||
hashrate.PushBack(normalize(hr->calc(i, Hashrate::MediumInterval)), allocator);
|
||||
hashrate.PushBack(normalize(hr->calc(i, Hashrate::LargeInterval)), allocator);
|
||||
|
||||
i++;
|
||||
|
||||
value.AddMember("hashrate", hashrate, allocator);
|
||||
list.PushBack(value, allocator);
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#define APP_ID "xmrig"
|
||||
#define APP_NAME "XMRig"
|
||||
#define APP_DESC "XMRig CPU miner"
|
||||
#define APP_VERSION "2.13.0-dev"
|
||||
#define APP_VERSION "2.13.0"
|
||||
#define APP_DOMAIN "xmrig.com"
|
||||
#define APP_SITE "www.xmrig.com"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2016-2019 xmrig.com"
|
||||
|
|
Loading…
Reference in a new issue