From cc429b68fadc502b981fd0acd64a5ff6e2ae1d15 Mon Sep 17 00:00:00 2001 From: psychocrypt Date: Fri, 29 Sep 2017 20:32:31 +0200 Subject: group files - move source code to `src` - categorize files and move to group folder - change upper case class files to lower case - change C++ header to `*.hpp` --- xmrstak/misc/telemetry.hpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 xmrstak/misc/telemetry.hpp (limited to 'xmrstak/misc/telemetry.hpp') diff --git a/xmrstak/misc/telemetry.hpp b/xmrstak/misc/telemetry.hpp new file mode 100644 index 0000000..0538090 --- /dev/null +++ b/xmrstak/misc/telemetry.hpp @@ -0,0 +1,23 @@ +#pragma once + +#include + +namespace xmrstak +{ + +class telemetry +{ +public: + telemetry(size_t iThd); + void push_perf_value(size_t iThd, uint64_t iHashCount, uint64_t iTimestamp); + double calc_telemetry_data(size_t iLastMilisec, size_t iThread); + +private: + constexpr static size_t iBucketSize = 2 << 11; //Power of 2 to simplify calculations + constexpr static size_t iBucketMask = iBucketSize - 1; + uint32_t* iBucketTop; + uint64_t** ppHashCounts; + uint64_t** ppTimestamps; +}; + +} // namepsace xmrstak -- cgit v1.1