EvEmu  0.8.4
11 September 2021
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Profiler.h
Go to the documentation of this file.
1 
20 #ifndef EVEMU_EVESERVER_PROFILER_H_
21 #define EVEMU_EVESERVER_PROFILER_H_
22 
23 
24 #include "eve-common.h"
25 
26 namespace Profile {
27  enum { // implemented? (* = yes)
28  destiny = 1, //*
29  map = 2, //
30  client = 3, //*
31  npc = 4, //*
32  bubbles = 5, //*
33  items = 6, //*
34  modules = 7, //*
35  functions = 8, //
36  db = 9, //*
37  ship = 10, //*
38  targets = 11, //*
39  server = 12, //
40  missile = 13, //*
41  system = 14, //*
42  entityS = 15, //*
43  loot = 16, //*
44  salvage = 17, //*
45  spawn = 18, //*
46  collision = 19, //*
47  drone = 20, //*
48  itemload = 21, //*
49  concord = 22, //
50  colony = 23, //*
51  damage = 24, //*
52  parseFX = 25, //*
53  applyFX = 26, //*
54  onTarg = 27 //
55  };
56 }
57 
58 class Profiler
59 : public Singleton<Profiler>
60 {
61 public:
62  Profiler();
63  ~Profiler();
64 
65  int Initialize();
66 
67  void AddTime(uint8 key, double value);
68  void PrintProfile();
69  void PrintStartUpData();
70  void ClearAll();
71 
72  void GetSize(size_t cSize, std::string& ret);
73 
74  void GetRunTimes(std::vector< double >& container, float& h, float& l, float& a);
75 
76 protected:
77  std::string GetKeyName(uint8& key);
78 
79 private:
80  std::vector<double> m_server;
81  std::vector<double> m_functions;
82  std::vector<double> m_db;
83  std::vector<double> m_client;
84  std::vector<double> m_map;
85  std::vector<double> m_destiny;
86  std::vector<double> m_system;
87  std::vector<double> m_entityS;
88  std::vector<double> m_npc;
89  std::vector<double> m_drone;
90  std::vector<double> m_bubbles;
91  std::vector<double> m_items;
92  std::vector<double> m_itemload;
93  std::vector<double> m_modules;
94  std::vector<double> m_ship;
95  std::vector<double> m_targets;
96  std::vector<double> m_ontarget;
97  std::vector<double> m_missile;
98  std::vector<double> m_loot;
99  std::vector<double> m_salvage;
100  std::vector<double> m_spawn;
101  std::vector<double> m_collision;
102  std::vector<double> m_concord;
103  std::vector<double> m_colony;
104  std::vector<double> m_damage;
105  std::vector<double> m_effects1;
106  std::vector<double> m_effects2;
107 };
108 
109 #define sProfiler \
110  ( Profiler::get() )
111 
112 #endif // EVEMU_EVESERVER_PROFILER_H_
std::vector< double > m_missile
Definition: Profiler.h:97
unsigned __int8 uint8
Definition: eve-compat.h:46
std::vector< double > m_ontarget
Definition: Profiler.h:96
std::vector< double > m_loot
Definition: Profiler.h:98
std::vector< double > m_spawn
Definition: Profiler.h:100
std::vector< double > m_damage
Definition: Profiler.h:104
std::vector< double > m_npc
Definition: Profiler.h:88
std::vector< double > m_db
Definition: Profiler.h:82
void AddTime(uint8 key, double value)
Definition: Profiler.cpp:25
void PrintProfile()
Definition: Profiler.cpp:179
std::vector< double > m_entityS
Definition: Profiler.h:87
void PrintStartUpData()
Definition: Profiler.cpp:295
std::vector< double > m_drone
Definition: Profiler.h:89
std::vector< double > m_items
Definition: Profiler.h:91
void GetSize(size_t cSize, std::string &ret)
Definition: Profiler.cpp:346
int Initialize()
Definition: Profiler.cpp:19
std::vector< double > m_salvage
Definition: Profiler.h:99
std::vector< double > m_targets
Definition: Profiler.h:95
std::vector< double > m_ship
Definition: Profiler.h:94
std::string GetKeyName(uint8 &key)
Definition: Profiler.cpp:359
std::vector< double > m_effects1
Definition: Profiler.h:105
std::vector< double > m_colony
Definition: Profiler.h:103
std::vector< double > m_concord
Definition: Profiler.h:102
std::vector< double > m_functions
Definition: Profiler.h:81
std::vector< double > m_itemload
Definition: Profiler.h:92
std::vector< double > m_system
Definition: Profiler.h:86
std::vector< double > m_client
Definition: Profiler.h:83
std::vector< double > m_modules
Definition: Profiler.h:93
Profiler()
Definition: Profiler.cpp:13
std::vector< double > m_bubbles
Definition: Profiler.h:90
std::vector< double > m_destiny
Definition: Profiler.h:85
std::vector< double > m_effects2
Definition: Profiler.h:106
void GetRunTimes(std::vector< double > &container, float &h, float &l, float &a)
Definition: Profiler.cpp:322
std::vector< double > m_map
Definition: Profiler.h:84
Template used for singleton classes.
Definition: Singleton.h:43
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type() key(value)-Send an OnRemoteMessage" ) COMMAND( setbpattr
~Profiler()
Definition: Profiler.cpp:15
std::vector< double > m_collision
Definition: Profiler.h:101
std::vector< double > m_server
Definition: Profiler.h:80
void ClearAll()
Definition: Profiler.cpp:148