Added algo performance calibration (benchmarking) functionality

This commit is contained in:
MoneroOcean 2018-07-18 16:49:09 +02:00
parent a8d399e450
commit 9951bd756d
9 changed files with 244 additions and 1 deletions

View file

@ -7,6 +7,7 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -120,6 +121,12 @@ bool Job::setBlob(const char *blob)
return true;
}
// for algo benchmarking
void Job::setRawBlob(const uint8_t *blob, const size_t size)
{
memcpy(m_blob, blob, m_size = size);
}
bool Job::setTarget(const char *target)
{

View file

@ -7,6 +7,7 @@
* Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt>
* Copyright 2018 Lee Clagett <https://github.com/vtnerd>
* Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com>
* Copyright 2018 MoneroOcean <https://github.com/MoneroOcean>, <support@moneroocean.stream>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -42,7 +43,10 @@ public:
~Job();
bool setBlob(const char *blob);
void setRawBlob(const uint8_t *blob, const size_t size); // for algo benchmarking
bool setTarget(const char *target);
// for algo benchmarking to set PoW variant
void setAlgorithm(const xmrig::Algorithm& algorithm) { m_algorithm = algorithm; }
xmrig::Variant variant() const;
inline bool isNicehash() const { return m_nicehash; }