mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
added ~aitaskspikethreshold/~taskspikethreshold
This commit is contained in:
parent
fdc9d8fd53
commit
a10f7a2b8c
@ -15,7 +15,7 @@ class TaskTracker:
|
|||||||
# number of samples required before spikes start getting identified
|
# number of samples required before spikes start getting identified
|
||||||
TaskTracker.MinSamples = config.GetInt('profile-task-spike-min-samples', 30)
|
TaskTracker.MinSamples = config.GetInt('profile-task-spike-min-samples', 30)
|
||||||
# defines spike as longer than this multiple of avg task duration
|
# defines spike as longer than this multiple of avg task duration
|
||||||
TaskTracker.SpikeThreshold = config.GetFloat('profile-task-spike-threshold', 10.)
|
TaskTracker.SpikeThreshold = TaskProfiler.GetDefaultSpikeThreshold()
|
||||||
def destroy(self):
|
def destroy(self):
|
||||||
self.flush()
|
self.flush()
|
||||||
del self._namePrefix
|
del self._namePrefix
|
||||||
@ -104,6 +104,17 @@ class TaskProfiler:
|
|||||||
del self._namePrefix2tracker
|
del self._namePrefix2tracker
|
||||||
del self._task
|
del self._task
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def GetDefaultSpikeThreshold():
|
||||||
|
return config.GetFloat('profile-task-spike-threshold', 10.)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def SetSpikeThreshold(spikeThreshold):
|
||||||
|
TaskTracker.SpikeThreshold = spikeThreshold
|
||||||
|
@staticmethod
|
||||||
|
def GetSpikeThreshold():
|
||||||
|
return TaskTracker.SpikeThreshold
|
||||||
|
|
||||||
def logProfiles(self, name=None):
|
def logProfiles(self, name=None):
|
||||||
if name:
|
if name:
|
||||||
name = name.lower()
|
name = name.lower()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user