Added hashrate information to "GET /1/threads" endpoint.
This commit is contained in:
parent
c221bf09f6
commit
c0a72edf9a
3 changed files with 33 additions and 3 deletions
|
@ -66,6 +66,26 @@ Job Workers::job()
|
|||
}
|
||||
|
||||
|
||||
size_t Workers::hugePages()
|
||||
{
|
||||
uv_mutex_lock(&m_mutex);
|
||||
const size_t hugePages = m_status.hugePages;
|
||||
uv_mutex_unlock(&m_mutex);
|
||||
|
||||
return hugePages;
|
||||
}
|
||||
|
||||
|
||||
size_t Workers::threads()
|
||||
{
|
||||
uv_mutex_lock(&m_mutex);
|
||||
const size_t threads = m_status.threads;
|
||||
uv_mutex_unlock(&m_mutex);
|
||||
|
||||
return threads;
|
||||
}
|
||||
|
||||
|
||||
void Workers::printHashrate(bool detail)
|
||||
{
|
||||
m_hashrate->print();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue