Модуль Benchmark

This commit is contained in:
Mit4el
2024-02-26 23:29:02 +03:00
parent 15de2955fb
commit b4919bddd6
13 changed files with 297 additions and 1730 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
#include <Arduino.h>
#include "Global.h"
#include "classes/IoTItem.h"
#include <map>
struct ItemBench
{
uint32_t sumloopTime = 0;
uint32_t loopTime = 0;
uint32_t loopTimeMax_p = 0;
uint32_t loopTimeMax_glob = 0;
uint32_t count = 0;
};
class IoTBench : public IoTItem
{
public:
IoTBench(const String &parameters);
~IoTBench();
virtual void preLoadFunction();
virtual void postLoadFunction();
virtual void preTaskFunction(const String &id);
virtual void postTaskFunction(const String &id);
protected:
std::map<String, ItemBench *> banchItems;
};

View File

@@ -1,5 +1,8 @@
#pragma once
#include "classes/IoTGpio.h"
//#include "classes/IoTBench.h"
class IoTBench;
struct IoTValue {
float valD = 0;
@@ -53,6 +56,9 @@ class IoTItem {
virtual IoTItem* getRtcDriver();
//virtual IoTItem* getCAMDriver();
virtual IoTItem* getTlgrmDriver();
//virtual IoTBench* getBenchmark();
virtual IoTBench*getBenchmarkTask();
virtual IoTBench*getBenchmarkLoad();
virtual unsigned long getRtcUnixTime();
// делаем доступным модулям отправку сообщений в телеграм