Files
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

54 lines
953 B
C++

#pragma once
#ifndef ABLPROFILER_HPP
#define ABLPROFILER_HPP
#pragma warning (push)
#include <stlport\map>
#include <stlport\string>
#pragma warning (pop)
namespace ABL
{
class Profiler
{
public:
Profiler();
~Profiler();
void SetActive(bool active);
bool GetActive() const;
void NotifyFunctionCalled(double time,
const char* function_name,
const char* module_name);
static Profiler* Instance();
private:
struct CallInfo
{
CallInfo();
double total_time;
int total_calls;
};
bool m_Active;
typedef std::map<std::string,CallInfo> call_info_map;
call_info_map m_PerFunctionTiming;
call_info_map m_PerModuleTiming;
void AddTimeToCallInfoMap(double time, const char* name, call_info_map& m);
void UpdateCallInfoMap(call_info_map& m);
void SpewIt() const;
static Profiler* m_Instance;
};
};
#endif // ABLPROFILER_HPP