TaskStat.h
Go to the documentation of this file.
1 /****
2  * Sming Framework Project - Open Source framework for high efficiency native ESP8266 development.
3  * Created 2015 by Skurydin Alexey
4  * http://github.com/SmingHub/Sming
5  * All files of the Sming Core are provided under the LGPL v3 license.
6  *
7  * TaskStat.h
8  *
9  */
10 
11 #pragma once
12 
13 #include <Print.h>
14 #include <memory>
15 
16 namespace Profiling
17 {
30 class TaskStat
31 {
32 public:
37  TaskStat(Print& out);
38 
40 
48  bool update();
49 
50 private:
51  Print& out;
52  static constexpr size_t maxTasks{32};
53  struct Info;
54  std::unique_ptr<Info[]> taskInfo;
55  uint8_t startIndex{0};
56  uint8_t endIndex{0};
57 };
58 
59 } // namespace Profiling
Provides formatted output to stream.
Definition: Print.h:37
Helper class to support printing of real-time task information.
Definition: TaskStat.h:31
TaskStat(Print &out)
Constructor.
bool update()
Update the report.
Definition: CpuUsage.h:5