Elaztek Developer Hub
Blamite Game Engine - blam!  00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
stats.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 
5 #ifndef BLAM
6 #define BLAM
7 #endif
8 
9 namespace Blam::Profiling
10 {
11  BLAM void ResetFrameStats();
12  BLAM void SetFrameStat(std::string id, double value);
13  BLAM void IncrementFrameStat(std::string id, double value);
14  BLAM double GetFrameStat(std::string id);
15  BLAM std::string GetFrameStatAsString(std::string id);
16 }
ENGINE_CFG_SECTION
#define ENGINE_CFG_SECTION(section_name)
Macro to quickly access a configuration section from the engine configuration file.
Definition: config.h:27
Blam::Profiling::ResetFrameStats
BLAM void ResetFrameStats()
Definition: stats.cpp:7
Blam::Logger::Queue::AddMessage
BLAM void AddMessage(BlamLogMessage message)
Adds a message to the queue.
Definition: queue.cpp:77
Blam::Logger::LogEvent
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
bypass_queue
bool bypass_queue
Whether or not to ignore the queue after initial startup.
Definition: queue.cpp:24
BlamReport
Class representing a report file.
Definition: logger.h:140
Blam::Logger::GetLogLevelColor
BLAM BlamColor GetLogLevelColor(BlamLogLevel log_level)
Retrieves the BlamColor that a specific log level should display with.
Definition: aliases.cpp:12
flush_thread_stopped
volatile bool flush_thread_stopped
Definition: queue.cpp:29
logger.h
use_reports
bool use_reports
Whether or not logs are being written to multiple report files.
Definition: queue.cpp:26
last_log_message
std::string last_log_message
Stores the text of the most recent log message. Used to check for duplicates.
Definition: queue.cpp:18
message_queue
std::vector< BlamLogMessage > message_queue
Queue of any log messages that need to be written to console and/or log files.
Definition: queue.cpp:15
Blam::Logger::Queue::StopFlushThread
BLAM void StopFlushThread()
Stops the logger queue flush thread.
Definition: queue.cpp:236
Blam::Profiling
Definition: stats.h:9
Blam::Tick::MaxTicksPerSecond
BLAM int MaxTicksPerSecond()
Retrieves the maximum number of ticks per second.
Definition: tick.cpp:217
Blam::Logger::Queue::GetQueue
BLAM std::vector< BlamLogMessage > * GetQueue()
Retrieves the current message queue.
Definition: queue.cpp:210
Blam::Profiling::IncrementFrameStat
BLAM void IncrementFrameStat(std::string id, double value)
Definition: stats.cpp:17
duplicate_count
int duplicate_count
The number of duplicate messages recieved.
Definition: queue.cpp:20
uint64_t
unsigned long long uint64_t
Definition: stdint.h:18
Blam::Profiling::GetFrameStat
BLAM double GetFrameStat(std::string id)
Definition: stats.cpp:29
stats.h
tick.h
Blam::Tick::GetTotalRuntimeTicks
BLAM uint64_t GetTotalRuntimeTicks()
Gets the total amount of ticks that have elapsed during program runtime.
Definition: tick.cpp:242
run_flush_thread
volatile bool run_flush_thread
Definition: queue.cpp:28
BLAM
#define BLAM
Definition: stats.h:6
BlamReport::LogEvent
bool LogEvent(BlamLogMessage message)
Writes a message to the log file, console, and/or STDOUT depending on the message.
Definition: BlamReport.cpp:77
Blam::Profiling::SetFrameStat
BLAM void SetFrameStat(std::string id, double value)
Definition: stats.cpp:12
Blam::Logger::Queue::Flush
BLAM void Flush()
Flushes the queue, causing all messages to be written to all places they are configured to do so.
Definition: queue.cpp:45
BlamReport::IsReady
bool IsReady()
Whether or not the report is ready for use.
Definition: BlamReport.cpp:174
max_errors_before_supression
int max_errors_before_supression
Controls the maximum amount of error messages shown before they are suppressed from the in-game conso...
Definition: queue.cpp:25
last_duplicate_message_tick
uint64_t last_duplicate_message_tick
The tick number when the last duplicate message was received. Not yet used.
Definition: queue.cpp:21
Blam::Logger::Queue::Shutdown
BLAM void Shutdown()
Flushes the queue and may later be used to perform other shutdown tasks.
Definition: queue.cpp:39
value
Offset font vertically by altering the io Font DisplayOffset value
Definition: README.txt:67
suppress_duplicates
bool suppress_duplicates
Whether or not to continue suppressing log messages.
Definition: queue.cpp:19
Blam::Logger::Queue::StartFlushThread
BLAM void StartFlushThread()
Starts the logger queue flush thread.
Definition: queue.cpp:231
Blam::Logger::GetReports
BLAM std::vector< BlamReport * > GetReports()
Retrieves the list of reports.
Definition: logger.cpp:208
last_flush_time
uint64_t last_flush_time
Definition: queue.cpp:30
config.h
performance_stats
std::unordered_map< std::string, double > performance_stats
Definition: stats.cpp:5
duplicate_tick_timeout
int duplicate_tick_timeout
Definition: queue.cpp:22
Blam::Logger::Queue::FlushThread
BLAM void FlushThread()
Function for the logger queue flush thread.
Definition: queue.cpp:215
Blam::Logger::Queue::Initialize
BLAM void Initialize()
Initializes the logger queue.
Definition: queue.cpp:32
Blam::Profiling::GetFrameStatAsString
BLAM std::string GetFrameStatAsString(std::string id)
Definition: stats.cpp:39
Blam::Logger::GetReport
BLAM BlamReport * GetReport(BlamReportType type)
Retrieves report data with the specified type.
Definition: logger.cpp:178
lock
volatile bool lock
Whether or not the queue is currently locked to aid in thread safety.
Definition: queue.cpp:17