VR-Forces 4.8 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfutil
profiler.h
Go to the documentation of this file.
1
/*********************************************************************************
2
** Copyright (c) 2020 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************************/
5
6
#pragma once
7
8
#include <
vrfutil/vrfutilDefines.h
>
9
10
//easy to use macro to profile a section
15
16
namespace
makVrf
17
{
18
class
DT_DLL_vrfutil
DtProfiler
19
{
20
public
:
21
static
void
initializeConsoleCommands();
22
static
void
setCollectTracyStats(
bool
);
23
static
bool
collectTracyStats();
24
};
25
}
26
28
//tracy
29
#ifdef TRACY_ENABLE
30
#define TRACY_ON_DEMAND
31
#define TRACY_DELAYED_INIT
32
//#define TRACY_NO_BROADCAST
34
#include <TracyClient/Tracy.hpp>
35
//#pragma comment(lib, "TracyClient.lib")
36
37
#define ZoneScopedNA( name, active ) ZoneNamedN( ___tracy_scoped_zone, name, active )
38
#define ZoneScopedNCA( name, color, active ) ZoneNamedNC( ___tracy_scoped_zone, name, color, active )
39
41
#define DtPROFILEzone ZoneNamed(___tracy_scoped_zone, makVrf::DtProfiler::collectTracyStats());
42
#define DtPROFILE(name) ZoneScopedNA(name, makVrf::DtProfiler::collectTracyStats());
43
#define DtPROFILEC(name, color) ZoneScopedNCA(name, color, makVrf::DtProfiler::collectTracyStats());
44
#define DtPROFILE_SECTION(name) {ZoneScopedNA(name, makVrf::DtProfiler::collectTracyStats());
45
#define DtPROFILE_SECTION_END }
46
#define DtVRF_PROFILE(name) DtPROFILE(name)
47
#define DtVRF_PROFILE_FILE(name) DtPROFILE(name)
48
//#define DtPROFILE(name) ZoneScopedNS(name, 4); DtPROFILE_X(name, __LINE__);
50
#define DtProfilerFrameMark if(makVrf::DtProfiler::collectTracyStats()) { FrameMark; }
51
#define DtProfilerPlot(x,y) TracyPlot(x,y)
52
#define DtProfilerThreadName(name) tracy::SetThreadName(name );
53
#define DtProfilerMessage(str, stringLen) TracyMessage(str, stringLen)
54
#else
55
#define DtProfilerFrameMark
56
#define DtPROFILEzone
57
#define DtPROFILE(name)
58
#define DtPROFILEC(name, color)
59
#define DtPROFILE_SECTION(name)
60
#define DtPROFILE_SECTION_END
61
#define DtVRF_PROFILE(name)
62
#define DtVRF_PROFILE_FILE(name)
63
#endif
vrfutilDefines.h
makVrf::DtProfiler
Definition:
profiler.h:18
DT_DLL_vrfutil
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition:
vrfutilDefines.h:34
Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (
www.mak.com
)