|
@@ -4,6 +4,8 @@
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+#ifndef DO_PSTATS
|
|
|
|
|
+
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
// Function: PStatCollector::Default Constructor
|
|
// Function: PStatCollector::Default Constructor
|
|
|
// Access: Private
|
|
// Access: Private
|
|
@@ -52,16 +54,11 @@ PStatCollector(PStatClient *client, int index) :
|
|
|
INLINE PStatCollector::
|
|
INLINE PStatCollector::
|
|
|
PStatCollector(const string &name, const RGBColorf &suggested_color,
|
|
PStatCollector(const string &name, const RGBColorf &suggested_color,
|
|
|
int sort, PStatClient *client) {
|
|
int sort, PStatClient *client) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
if (client == (PStatClient *)NULL) {
|
|
if (client == (PStatClient *)NULL) {
|
|
|
client = PStatClient::get_global_pstats();
|
|
client = PStatClient::get_global_pstats();
|
|
|
}
|
|
}
|
|
|
PStatCollector collector(client->make_collector(0, name, suggested_color, sort));
|
|
PStatCollector collector(client->make_collector(0, name, suggested_color, sort));
|
|
|
(*this) = collector;
|
|
(*this) = collector;
|
|
|
-#else
|
|
|
|
|
- _client = (PStatClient *)NULL;
|
|
|
|
|
- _index = 0;
|
|
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -90,15 +87,10 @@ PStatCollector(const string &name, const RGBColorf &suggested_color,
|
|
|
INLINE PStatCollector::
|
|
INLINE PStatCollector::
|
|
|
PStatCollector(const PStatCollector &parent, const string &name,
|
|
PStatCollector(const PStatCollector &parent, const string &name,
|
|
|
const RGBColorf &suggested_color, int sort) {
|
|
const RGBColorf &suggested_color, int sort) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
nassertv(parent._client != (PStatClient *)NULL);
|
|
nassertv(parent._client != (PStatClient *)NULL);
|
|
|
PStatCollector collector(parent._client->make_collector
|
|
PStatCollector collector(parent._client->make_collector
|
|
|
(parent._index, name, suggested_color, sort));
|
|
(parent._index, name, suggested_color, sort));
|
|
|
(*this) = collector;
|
|
(*this) = collector;
|
|
|
-#else
|
|
|
|
|
- _client = (PStatClient *)NULL;
|
|
|
|
|
- _index = 0;
|
|
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -132,9 +124,7 @@ operator = (const PStatCollector ©) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
start() {
|
|
start() {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->start(_index, 0, _client->_clock.get_real_time());
|
|
_client->start(_index, 0, _client->_clock.get_real_time());
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -144,9 +134,7 @@ start() {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
start(const PStatThread &thread) {
|
|
start(const PStatThread &thread) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->start(_index, thread._index, _client->_clock.get_real_time());
|
|
_client->start(_index, thread._index, _client->_clock.get_real_time());
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -160,9 +148,7 @@ start(const PStatThread &thread) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
start(const PStatThread &thread, double as_of) {
|
|
start(const PStatThread &thread, double as_of) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->start(_index, thread._index, as_of);
|
|
_client->start(_index, thread._index, as_of);
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -173,9 +159,7 @@ start(const PStatThread &thread, double as_of) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
stop() {
|
|
stop() {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->stop(_index, 0, _client->_clock.get_real_time());
|
|
_client->stop(_index, 0, _client->_clock.get_real_time());
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -185,9 +169,7 @@ stop() {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
stop(const PStatThread &thread) {
|
|
stop(const PStatThread &thread) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->stop(_index, thread._index, _client->_clock.get_real_time());
|
|
_client->stop(_index, thread._index, _client->_clock.get_real_time());
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
@@ -201,7 +183,7 @@ stop(const PStatThread &thread) {
|
|
|
////////////////////////////////////////////////////////////////////
|
|
////////////////////////////////////////////////////////////////////
|
|
|
INLINE void PStatCollector::
|
|
INLINE void PStatCollector::
|
|
|
stop(const PStatThread &thread, double as_of) {
|
|
stop(const PStatThread &thread, double as_of) {
|
|
|
-#ifdef HAVE_NET
|
|
|
|
|
_client->stop(_index, thread._index, as_of);
|
|
_client->stop(_index, thread._index, as_of);
|
|
|
-#endif
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+#endif // DO_PSTATS
|