Panda3D
Loading...
Searching...
No Matches
ProfileSession Class Reference

Public Member Functions

 __init__ (self, name, func=None, logAfterProfile=False)
 
 acquire (self)
 
 aggregate (self, other)
 
 getAggregate (self)
 
 getDuration (self)
 
 getFunc (self)
 
 getLines (self)
 
 getLogAfterProfile (self)
 
 getName (self)
 
 getReference (self)
 
 getResults (self, lines=Default, sorts=Default, callInfo=Default, totalTime=Default)
 
 getShowCallInfo (self)
 
 getSorts (self)
 
 getTotalTime (self)
 
 profileSucceeded (self)
 
 release (self)
 
 resetTotalTime (self)
 
 run (self)
 
 setAggregate (self, aggregate)
 
 setFunc (self, func)
 
 setLines (self, lines)
 
 setLogAfterProfile (self, logAfterProfile)
 
 setName (self, name)
 
 setShowCallInfo (self, showCallInfo)
 
 setSorts (self, sorts)
 
 setTotalTime (self, totalTime=None)
 

Static Public Attributes

 notify = directNotify.newCategory("ProfileSession")
 
 TrueClock = TrueClock.getGlobalPtr()
 

Protected Member Functions

 _compileStats (self)
 
 _destroy (self)
 
 _discardRamFile (self, filename)
 
 _getNextFilename (self)
 
 _reset (self)
 
 _restoreRamFile (self, filename)
 

Protected Attributes

bool _aggregate = False
 
bool _callInfo = True
 
int _duration = None
 
dict _filename2ramFile = {}
 
str _filenameBase = 'profileData-%s-%s' % (self._name, id(self))
 
int _filenameCounter = 0
 
list _filenames = []
 
 _func = func
 
int _lines = 500
 
 _logAfterProfile = logAfterProfile
 
 _name = name
 
int _refCount = 0
 
dict _resultCache = {}
 
 _showCallInfo = showCallInfo
 
list _sorts = ['cumulative', 'time', 'calls']
 
int _statFileCounter = 0
 
 _stats = None
 
int _successfulProfiles = 0
 
 _totalTime = None
 

Constructor & Destructor Documentation

◆ __init__()

__init__ ( self,
name,
func = None,
logAfterProfile = False )

Member Function Documentation

◆ _compileStats()

_compileStats ( self)
protected

◆ _destroy()

_destroy ( self)
protected

◆ _discardRamFile()

_discardRamFile ( self,
filename )
protected

◆ _getNextFilename()

_getNextFilename ( self)
protected

◆ _reset()

_reset ( self)
protected

◆ _restoreRamFile()

_restoreRamFile ( self,
filename )
protected

◆ acquire()

acquire ( self)

◆ aggregate()

aggregate ( self,
other )

◆ getAggregate()

getAggregate ( self)

◆ getDuration()

getDuration ( self)

◆ getFunc()

getFunc ( self)

◆ getLines()

getLines ( self)

◆ getLogAfterProfile()

getLogAfterProfile ( self)

◆ getName()

getName ( self)

◆ getReference()

getReference ( self)

◆ getResults()

getResults ( self,
lines = Default,
sorts = Default,
callInfo = Default,
totalTime = Default )

◆ getShowCallInfo()

getShowCallInfo ( self)

◆ getSorts()

getSorts ( self)

◆ getTotalTime()

getTotalTime ( self)

◆ profileSucceeded()

profileSucceeded ( self)

◆ release()

release ( self)

◆ resetTotalTime()

resetTotalTime ( self)

◆ run()

run ( self)

◆ setAggregate()

setAggregate ( self,
aggregate )

◆ setFunc()

setFunc ( self,
func )

◆ setLines()

setLines ( self,
lines )

◆ setLogAfterProfile()

setLogAfterProfile ( self,
logAfterProfile )

◆ setName()

setName ( self,
name )

◆ setShowCallInfo()

setShowCallInfo ( self,
showCallInfo )

◆ setSorts()

setSorts ( self,
sorts )

◆ setTotalTime()

setTotalTime ( self,
totalTime = None )

Member Data Documentation

◆ _aggregate

bool _aggregate = False
protected

◆ _callInfo

bool _callInfo = True
protected

◆ _duration

int _duration = None
protected

◆ _filename2ramFile

dict _filename2ramFile = {}
protected

◆ _filenameBase

str _filenameBase = 'profileData-%s-%s' % (self._name, id(self))
protected

◆ _filenameCounter

int _filenameCounter = 0
protected

◆ _filenames

_filenames = []
protected

◆ _func

_func = func
protected

◆ _lines

int _lines = 500
protected

◆ _logAfterProfile

_logAfterProfile = logAfterProfile
protected

◆ _name

_name = name
protected

◆ _refCount

int _refCount = 0
protected

◆ _resultCache

dict _resultCache = {}
protected

◆ _showCallInfo

_showCallInfo = showCallInfo
protected

◆ _sorts

list _sorts = ['cumulative', 'time', 'calls']
protected

◆ _statFileCounter

int _statFileCounter = 0
protected

◆ _stats

_stats = None
protected

◆ _successfulProfiles

int _successfulProfiles = 0
protected

◆ _totalTime

_totalTime = None
protected

◆ notify

notify = directNotify.newCategory("ProfileSession")
static

◆ TrueClock

TrueClock = TrueClock.getGlobalPtr()
static