Browse Source

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

Also remove outdated definitions from pStatProperties.cxx
rdb 3 years ago
parent
commit
867f60dcca

+ 2 - 2
direct/src/dcparser/dcClass.cxx

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

+ 1 - 1
direct/src/distributed/cConnectionRepository.cxx

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

+ 1 - 1
direct/src/interval/Interval.py

@@ -41,7 +41,7 @@ class Interval(DirectObject):
         self.pstats = None
         if __debug__ and TaskManager.taskTimerVerbose:
             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
         # completely skipped over during initialize or finalize, false

+ 1 - 1
direct/src/interval/MetaInterval.py

@@ -106,7 +106,7 @@ class MetaInterval(CMetaInterval):
         self.pstats = None
         if __debug__ and TaskManager.taskTimerVerbose:
             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 = []
 

+ 1 - 1
direct/src/interval/cInterval.cxx

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

+ 2 - 2
direct/src/showbase/EventManager.py

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

+ 1 - 1
direct/src/showbase/Job.py

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

+ 2 - 2
panda/src/event/asyncTask.cxx

@@ -21,7 +21,7 @@
 using std::string;
 
 AtomicAdjust::Integer AsyncTask::_next_task_id;
-PStatCollector AsyncTask::_show_code_pcollector("App:Show code");
+PStatCollector AsyncTask::_tasks_pcollector("App:Tasks");
 TypeHandle AsyncTask::_type_handle;
 
 /**
@@ -213,7 +213,7 @@ set_name(const string &name) {
       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,
   // name.substr(0, end));
   _task_pcollector = parent;

+ 1 - 1
panda/src/event/asyncTask.h

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

+ 1 - 9
panda/src/pstatclient/pStatProperties.cxx

@@ -108,15 +108,7 @@ static TimeCollectorProperties time_properties[] = {
   { 1, "App:Collisions",                   { 1.0, 0.5, 0.0 } },
   { 1, "App:Collisions:Reset",             { 0.0, 0.0, 0.5 } },
   { 0, "App:Data graph",                   { 0.5, 0.8, 0.4 } },
-  { 1, "App:Show code",                    { 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, "App:Tasks",                        { 0.8, 0.2, 1.0 } },
   { 1, "Cull",                             { 0.21, 0.68, 0.37 },  1.0 / 30.0 },
   { 1, "Cull:Setup",                       { 0.7, 0.4, 0.5 } },
   { 1, "Cull:Sort",                        { 0.3, 0.3, 0.6 } },