Improved CPU profile generation.

This commit is contained in:
XMRig 2019-10-09 12:58:11 +07:00
parent 7db7b3727d
commit 61ab47cc95
10 changed files with 190 additions and 80 deletions

View file

@ -38,7 +38,7 @@ namespace xmrig {
class CpuThreads
{
public:
inline CpuThreads() {}
inline CpuThreads() = default;
inline CpuThreads(size_t count) : m_data(count) {}
CpuThreads(const rapidjson::Value &value);
@ -51,6 +51,10 @@ public:
inline void add(int64_t affinity, uint32_t intensity) { add(CpuThread(affinity, intensity)); }
inline void reserve(size_t capacity) { m_data.reserve(capacity); }
inline bool operator!=(const CpuThreads &other) const { return !isEqual(other); }
inline bool operator==(const CpuThreads &other) const { return isEqual(other); }
bool isEqual(const CpuThreads &other) const;
rapidjson::Value toJSON(rapidjson::Document &doc) const;
private: