acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
ProfileLogger.h
1// From ProfileLogger by camilo on 2026-04-25 03:45 <3ThomasBorregaardSørensen!!
2#pragma once
3
4//#include <map>
5//#include <vector>
6//#include "thread/LocalMutex.h"
7//#include "util/DateTime.h"
8
9
10namespace platform
11{
13 {
14 ::f64 m_process;
15 ::f64 m_kernel;
16 ::u64 m_cycle;
17 class ::time m_time;
18 };
19
20 // �lass for acquiring processor load metrics.
21 class CLASS_DECL_ACME ProfileLogger :
22 virtual public ::particle
23 {
24 public:
25 ProfileLogger();
26
27 ~ProfileLogger();
28 // returns cycles and times deltas from previouse checkpoint
29 ProcessorTimes checkPoint(const_char_pointer tag);
30 ::string_array dropStat();
31
32 //private:
33 //LocalMutex m_mapMut;
34 critical_section m_criticalsection;
35 ::map_base < const_char_pointer , ::array_base<ProcessorTimes>> m_checkPoints;
36 ProcessorTimes m_last;
37 ::f64 m_dropRate; // time interval in seconds to log statistics
38 class ::time m_lastDrop;
39 };
40
41
42} // namespace platform
43
44
45CLASS_DECL_ACME ::platform::ProfileLogger & ProfileLogger();
46
47
48CLASS_DECL_ACME void deferProfileLogger();
Definition critical_section.h:9
include "thread/AutoLock.h"
Definition _forward_declaration.h:877
Definition ProfileLogger.h:13