OpenTwin
0.1
OpenTwin
Loading...
Searching...
No Matches
PerformanceTests.h
Go to the documentation of this file.
1
4
// ###########################################################################################################################################################################################################################################################################################################################
5
6
#pragma once
7
8
// OpenTwin header
9
#include "
OTCore/CoreAPIExport.h
"
10
#include "
OTCore/OTClassHelper.h
"
11
12
// std header
13
#include <string>
14
#include <chrono>
15
19
#define OT_TEST_Interval(___objectName, ___testText) ot::PerformanceIntervalTest ___objectName; ___objectName.logOnDelete(___testText)
20
21
namespace
ot
{
22
23
class
OT_CORE_API_EXPORT
PerformanceIntervalTest
{
24
OT_DECL_NOCOPY
(
PerformanceIntervalTest
)
25
public
:
26
PerformanceIntervalTest
();
27
~PerformanceIntervalTest
();
28
30
void
logCurrentInterval(
const
std::string& _testName)
const
;
31
33
long
long
currentInterval(
void
)
const
;
34
35
void
logOnDelete(
const
std::string& _message);
36
37
private
:
38
std::string niceIntervalString(
long
long
_ms)
const
;
39
40
bool
m_logOnDeleteEnabled;
41
std::string m_logOnDelete;
42
std::chrono::steady_clock::time_point m_startTime;
43
};
44
45
}
CoreAPIExport.h
OT_CORE_API_EXPORT
#define OT_CORE_API_EXPORT
Dll import.
Definition
CoreAPIExport.h:8
OTClassHelper.h
This file contains defines that may be used simplyfy class creation.
OT_DECL_NOCOPY
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition
OTClassHelper.h:14
ot::PerformanceIntervalTest
Definition
PerformanceTests.h:23
ot
Definition
Connector.h:8
Libraries
OTCore
include
OTCore
PerformanceTests.h
Generated by
1.10.0