Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
LoadTimeTrace.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreTypes.h"
6#include "Misc/Build.h"
7#include "ProfilingDebugging/FormatArgsTrace.h"
8#include "Trace/Config.h"
9#include "Trace/Trace.h"
10
11namespace UE { namespace Trace { class FChannel; } }
12
13#if !defined(LOADTIMEPROFILERTRACE_ENABLED)
14#if UE_TRACE_ENABLED && !UE_BUILD_SHIPPING
15#define LOADTIMEPROFILERTRACE_ENABLED 1
16#else
17#define LOADTIMEPROFILERTRACE_ENABLED 0
18#endif
19#endif
20
22
23UE_TRACE_CHANNEL_EXTERN(LoadTimeChannel, );
24UE_TRACE_CHANNEL_EXTERN(AssetLoadTimeChannel, );
25
26struct FLoadTimeProfilerTrace
27{
28 struct FRequestGroupScope
29 {
30 template <typename... Types>
31 FRequestGroupScope(const TCHAR* InFormatString, Types... FormatArgs)
32 {
33 FormatString = InFormatString;
34 FormatArgsSize = FFormatArgsTrace::EncodeArguments(FormatArgsBuffer, FormatArgs...);
35 OutputBegin();
36 }
37
38 ~FRequestGroupScope();
39
40 private:
41 void OutputBegin();
42
43 const TCHAR* FormatString = nullptr;
44 uint16 FormatArgsSize = 0;
45 uint8 FormatArgsBuffer[1024];
46 };
47};
48
49#define TRACE_LOADTIME_REQUEST_GROUP_SCOPE(Format, ...)
50 FLoadTimeProfilerTrace::FRequestGroupScope __LoadTimeTraceRequestGroupScope(Format, ##__VA_ARGS__);
51
52#else
53#define TRACE_LOADTIME_REQUEST_GROUP_SCOPE(...)
54#endif
#define UE_BUILD_SHIPPING
Definition Build.h:4
#define LOADTIMEPROFILERTRACE_ENABLED
Definition Vector.h:40