gwnavruntime/database/querystatistics.h Source File
Go to the documentation of this file.
19 class PerformQueryStatCounter
25 for (
KyUInt32 i = 0; i < QueryType_FirstCustom; ++i)
26 m_perQueryCounter[i] = 0;
29 void Increment(
QueryType queryType) { ++m_perQueryCounter[queryType]; }
31 KyUInt32 GetCount(
QueryType queryType)
const {
return m_perQueryCounter[queryType]; }
34 KyUInt32 m_perQueryCounter[QueryType_FirstCustom];
39 QueryStatReport_RelevantOnly,
43 #if defined(KY_CONFIG_DEBUG_OR_DEV)
58 class PerformQueryStatistics
64 void ResetPerformQueryCounter();
67 void Report(StringBuffer* report,
QueryStatReportType reportType = QueryStatReport_RelevantOnly)
const;
74 void IncrementPerformQueryStat(
PerformQueryStat stat,
QueryType queryType) {
if (stat < PerformQueryStat_Count) m_queryStatCounter[stat].Increment(queryType); }
78 KyUInt32& GetPerformQueryCount(
QueryType queryType) {
return m_perQueryCounter[queryType]; }
81 KyArray<KyUInt32> m_perQueryCounter;
82 KyArray<PerformQueryStatCounter> m_queryStatCounter;
86 class ScopedPerformedQueryCounter
93 ~ScopedPerformedQueryCounter() { ++m_counter; }
99 #else // KY_CONFIG_RELEASE is defined
101 class PerformQueryStatistics
105 void ResetPerformQueryCounter() {}
106 void Report(StringBuffer*,
QueryStatReportType reportType = QueryStatReport_RelevantOnly)
const { KY_UNUSED(reportType); }
110 class ScopedPerformedQueryCounter
115 ~ScopedPerformedQueryCounter() {}
The report will prune PerformQueryStat with no count.
Definition: querystatistics.h:40
std::uint32_t KyUInt32
uint32_t
Definition: types.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:132
QueryType
Enumerates all the type of query.
Definition: iquery.h:25
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
QueryStatReportType
Definition: querystatistics.h:37
PerformQueryStat
Definition: iquery.h:62