|
|
@ -28,10 +28,13 @@ class fpsMetrics {
|
|
|
|
|
|
|
|
|
|
|
|
void calculate(){
|
|
|
|
void calculate(){
|
|
|
|
thread_init = true;
|
|
|
|
thread_init = true;
|
|
|
|
while (!terminate){
|
|
|
|
while (true){
|
|
|
|
std::unique_lock<std::mutex> lock(mtx);
|
|
|
|
std::unique_lock<std::mutex> lock(mtx);
|
|
|
|
cv.wait(lock, [this] { return run; });
|
|
|
|
cv.wait(lock, [this] { return run; });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (terminate)
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
std::vector<float> sorted_values;
|
|
|
|
std::vector<float> sorted_values;
|
|
|
|
for (const auto& p : fps_stats)
|
|
|
|
for (const auto& p : fps_stats)
|
|
|
|
sorted_values.push_back(p.second);
|
|
|
|
sorted_values.push_back(p.second);
|
|
|
|