mirror of
https://github.com/Relintai/godot_voxel.git
synced 2024-11-11 20:35:08 +01:00
42 lines
689 B
C++
42 lines
689 B
C++
#ifndef VOXEL_PROFILING_H
|
|
#define VOXEL_PROFILING_H
|
|
|
|
#define VOXEL_PROFILING
|
|
|
|
#ifdef VOXEL_PROFILING
|
|
|
|
#include <ustring.h>
|
|
#include <dictionary.h>
|
|
#include <hash_map.h>
|
|
|
|
#define VOXEL_PROFILE_BEGIN(_key) _zprofiler.begin(_key);
|
|
#define VOXEL_PROFILE_END(_key) _zprofiler.end(_key);
|
|
|
|
class ZProfileVar;
|
|
|
|
class ZProfiler {
|
|
public:
|
|
//static ZProfiler & get();
|
|
~ZProfiler();
|
|
|
|
void begin(String key);
|
|
void end(String key);
|
|
|
|
Dictionary get_all_serialized_info() const;
|
|
|
|
private:
|
|
//ZProfiler();
|
|
ZProfileVar * get_var(String key);
|
|
|
|
HashMap<String, ZProfileVar*> _vars;
|
|
};
|
|
|
|
#else
|
|
|
|
#define VOXEL_PROFILE_BEGIN(_key) //
|
|
#define VOXEL_PROFILE_END(_key) //
|
|
|
|
#endif
|
|
|
|
#endif // VOXEL_PROFILING_H
|