pstats: Rename "Show code" collector to "Tasks"

Also remove outdated definitions from pStatProperties.cxx
This commit is contained in:
rdb 2022-11-29 18:27:45 +01:00
parent 386fe609fa
commit 867f60dcca
10 changed files with 13 additions and 21 deletions

View File

@ -24,8 +24,8 @@ using std::string;
#ifdef WITHIN_PANDA #ifdef WITHIN_PANDA
#ifndef CPPPARSER #ifndef CPPPARSER
PStatCollector DCClass::_update_pcollector("App:Show code:readerPollTask:Update"); PStatCollector DCClass::_update_pcollector("App:Tasks:readerPollTask:Update");
PStatCollector DCClass::_generate_pcollector("App:Show code:readerPollTask:Generate"); PStatCollector DCClass::_generate_pcollector("App:Tasks:readerPollTask:Generate");
#endif // CPPPARSER #endif // CPPPARSER
ConfigVariableBool dc_multiple_inheritance ConfigVariableBool dc_multiple_inheritance

View File

@ -35,7 +35,7 @@ using std::string;
const string CConnectionRepository::_overflow_event_name = "CRDatagramOverflow"; const string CConnectionRepository::_overflow_event_name = "CRDatagramOverflow";
#ifndef CPPPARSER #ifndef CPPPARSER
PStatCollector CConnectionRepository::_update_pcollector("App:Show code:readerPollTask:Update"); PStatCollector CConnectionRepository::_update_pcollector("App:Tasks:readerPollTask:Update");
#endif // CPPPARSER #endif // CPPPARSER
/** /**

View File

@ -41,7 +41,7 @@ class Interval(DirectObject):
self.pstats = None self.pstats = None
if __debug__ and TaskManager.taskTimerVerbose: if __debug__ and TaskManager.taskTimerVerbose:
self.pname = name.split('-', 1)[0] self.pname = name.split('-', 1)[0]
self.pstats = PStatCollector("App:Show code:ivalLoop:%s" % (self.pname)) self.pstats = PStatCollector("App:Tasks:ivalLoop:%s" % (self.pname))
# Set true if the interval should be invoked if it was # Set true if the interval should be invoked if it was
# completely skipped over during initialize or finalize, false # completely skipped over during initialize or finalize, false

View File

@ -106,7 +106,7 @@ class MetaInterval(CMetaInterval):
self.pstats = None self.pstats = None
if __debug__ and TaskManager.taskTimerVerbose: if __debug__ and TaskManager.taskTimerVerbose:
self.pname = name.split('-', 1)[0] self.pname = name.split('-', 1)[0]
self.pstats = PStatCollector("App:Show code:ivalLoop:%s" % (self.pname)) self.pstats = PStatCollector("App:Tasks:ivalLoop:%s" % (self.pname))
self.pythonIvals = [] self.pythonIvals = []

View File

@ -22,7 +22,7 @@
using std::ostream; using std::ostream;
using std::string; using std::string;
PStatCollector CInterval::_root_pcollector("App:Show code:ivalLoop"); PStatCollector CInterval::_root_pcollector("App:Tasks:ivalLoop");
TypeHandle CInterval::_type_handle; TypeHandle CInterval::_type_handle;
static inline string static inline string

View File

@ -137,11 +137,11 @@ class EventManager:
hyphen = name.find('-') hyphen = name.find('-')
if hyphen >= 0: if hyphen >= 0:
name = name[0:hyphen] name = name[0:hyphen]
pstatCollector = PStatCollector('App:Show code:eventManager:' + name) pstatCollector = PStatCollector('App:Tasks:eventManager:' + name)
pstatCollector.start() pstatCollector.start()
if self.eventHandler: if self.eventHandler:
cppPstatCollector = PStatCollector( cppPstatCollector = PStatCollector(
'App:Show code:eventManager:' + name + ':C++') 'App:Tasks:eventManager:' + name + ':C++')
messenger.send(eventName, paramList) messenger.send(eventName, paramList)

View File

@ -35,7 +35,7 @@ class Job(DirectObject):
self._priority = Job.Priorities.Normal self._priority = Job.Priorities.Normal
self._finished = False self._finished = False
if __debug__: if __debug__:
self._pstats = PStatCollector("App:Show code:jobManager:%s" % self._name) self._pstats = PStatCollector("App:Tasks:jobManager:%s" % self._name)
def destroy(self): def destroy(self):
del self._name del self._name

View File

@ -21,7 +21,7 @@
using std::string; using std::string;
AtomicAdjust::Integer AsyncTask::_next_task_id; AtomicAdjust::Integer AsyncTask::_next_task_id;
PStatCollector AsyncTask::_show_code_pcollector("App:Show code"); PStatCollector AsyncTask::_tasks_pcollector("App:Tasks");
TypeHandle AsyncTask::_type_handle; TypeHandle AsyncTask::_type_handle;
/** /**
@ -213,7 +213,7 @@ set_name(const string &name) {
break; break;
} }
} }
PStatCollector parent(_show_code_pcollector, name.substr(0, trimmed)); PStatCollector parent(_tasks_pcollector, name.substr(0, trimmed));
// prevent memory leak _task_pcollector = PStatCollector(parent, // prevent memory leak _task_pcollector = PStatCollector(parent,
// name.substr(0, end)); // name.substr(0, end));
_task_pcollector = parent; _task_pcollector = parent;

View File

@ -156,7 +156,7 @@ protected:
static AtomicAdjust::Integer _next_task_id; static AtomicAdjust::Integer _next_task_id;
static PStatCollector _show_code_pcollector; static PStatCollector _tasks_pcollector;
PStatCollector _task_pcollector; PStatCollector _task_pcollector;
friend class PythonTask; friend class PythonTask;

View File

@ -108,15 +108,7 @@ static TimeCollectorProperties time_properties[] = {
{ 1, "App:Collisions", { 1.0, 0.5, 0.0 } }, { 1, "App:Collisions", { 1.0, 0.5, 0.0 } },
{ 1, "App:Collisions:Reset", { 0.0, 0.0, 0.5 } }, { 1, "App:Collisions:Reset", { 0.0, 0.0, 0.5 } },
{ 0, "App:Data graph", { 0.5, 0.8, 0.4 } }, { 0, "App:Data graph", { 0.5, 0.8, 0.4 } },
{ 1, "App:Show code", { 0.8, 0.2, 1.0 } }, { 1, "App:Tasks", { 0.8, 0.2, 1.0 } },
//{ 0, "App:Show code:General", { 0.4, 0.3, 0.9 } },
{ 0, "App:Show code:Nametags", { 0.8, 0.8, 1.0 } },
{ 0, "App:Show code:Nametags:2d", { 0.0, 0.0, 0.5 } },
{ 0, "App:Show code:Nametags:2d:Contents", { 0.0, 0.5, 0.0 } },
{ 0, "App:Show code:Nametags:2d:Adjust", { 0.5, 0.0, 0.5 } },
{ 0, "App:Show code:Nametags:3d", { 1.0, 0.0, 0.0 } },
{ 0, "App:Show code:Nametags:3d:Contents", { 0.0, 0.5, 0.0 } },
{ 0, "App:Show code:Nametags:3d:Adjust", { 0.5, 0.0, 0.5 } },
{ 1, "Cull", { 0.21, 0.68, 0.37 }, 1.0 / 30.0 }, { 1, "Cull", { 0.21, 0.68, 0.37 }, 1.0 / 30.0 },
{ 1, "Cull:Setup", { 0.7, 0.4, 0.5 } }, { 1, "Cull:Setup", { 0.7, 0.4, 0.5 } },
{ 1, "Cull:Sort", { 0.3, 0.3, 0.6 } }, { 1, "Cull:Sort", { 0.3, 0.3, 0.6 } },