Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
GarbageReport Class Reference
Inheritance diagram for GarbageReport:

## Public Member Functions
| __init__ (self, name, log=True, verbose=False, fullReport=False, findCycles=True, threaded=False, doneCallback=None, autoDestroy=False, priority=None, safeMode=False, delOnly=False, collect=True)
| destroy (self)
| finished (self)
| getDesc2numDict (self)
| getGarbage (self)
| getNumCycles (self)
| getReport (self)
| run (self)
Public Member Functions inherited from Job
| __init__ (self, name)
| getFinishedEvent (self)
| getJobName (self)
| getPriority (self)
| isFinished (self)
| printingBegin (self)
| printingEnd (self)
| resume (self)
| setPriority (self, priority)
| suspend (self)
Public Member Functions inherited from DirectObject
| __init__ (self)
| accept (self, event, method, extraArgs=[])
| acceptOnce (self, event, method, extraArgs=[])
| addTask (self, *args, **kwargs)
| detectLeaks (self)
| doMethodLater (self, *args, **kwargs)
| getAllAccepting (self)
| ignore (self, event)
| ignoreAll (self)
| isAccepting (self, event)
| isIgnoring (self, event)
| removeAllTasks (self)
| removeTask (self, taskOrName)

## Public Attributes
| cycleIds = set()
list | cycles = []
list | cyclesBySyntax = []
| garbage = gc.garbage[:]
| garbageInstanceIds = set()
| numCycles = len(self.cycles)
| numGarbage = len(self.garbage)
| numGarbageInstances = len(garbageInstances)
dict | referentsByNumber = {}
dict | referentsByReference = {}
dict | referrersByNumber = {}
dict | referrersByReference = {}
| uniqueCycleSets = set()

## Static Public Attributes
| notify = directNotify.newCategory("GarbageReport")
Static Public Attributes inherited from Job
| Continue = None
| `yield None` is acceptable in place of `yield Job.Continue`
| Done = object()
| Yielded from the `run()` generator method when the job is done.
| Priorities = ScratchPad(Min=1, Low=100, Normal=1000, High=10000)
| Sleep = object()
| Yield any remaining time for this job until next frame.
Static Public Attributes inherited from DirectObject
| accept_once = acceptOnce
| add_task = addTask
| detect_leaks = detectLeaks
| do_method_later = doMethodLater
| get_all_accepting = getAllAccepting
| ignore_all = ignoreAll
| is_accepting = isAccepting
| is_ignoring = isIgnoring
| remove_all_tasks = removeAllTasks
| remove_task = removeTask

## Protected Member Functions
| _getCycles (self, index, uniqueCycleSets=None)
| _getNormalizedCycle (self, cycle)
| _getReferents (self, obj)
| _getReferrers (self, obj)
Protected Member Functions inherited from Job
| _cleanupGenerator (self)
| _getGenerator (self)
| _getJobId (self)
| _setFinished (self)
Protected Member Functions inherited from DirectObject
| _addTask (self, task)
| _clearTask (self, task)

## Protected Attributes
| _args
dict | _id2garbageInfo = {}
dict | _id2index = {}
| _report = s
str | _reportStr = ''
Protected Attributes inherited from Job
bool | _finished = False
| _generator = None
| _id = Job._SerialGen.next()
| _name = name
bool | _printing = False
| _priority = Job.Priorities.Normal
| _pstats = PStatCollector("App:Show code:jobManager:%s" % self._name)
Protected Attributes inherited from DirectObject
dict | _taskList = {}

## Additional Inherited Members
Static Protected Attributes inherited from Job
| _SerialGen = SerialNumGen()

## Detailed Description

    Detects leaked Python objects (via gc.collect()) and reports on garbage
    items, garbage-to-garbage references, and garbage cycles.
    If you just want to dump the report to the log, use GarbageLogger.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | name,
|  |  | log = True,
|  |  | verbose = False,
|  |  | fullReport = False,
|  |  | findCycles = True,
|  |  | threaded = False,
|  |  | doneCallback = None,
|  |  | autoDestroy = False,
|  |  | priority = None,
|  |  | safeMode = False,
|  |  | delOnly = False,
|  |  | collect = True )

## Member Function Documentation

## ◆ _getCycles()

_getCycles | ( |  | self,
|  |  | index,
|  |  | uniqueCycleSets = None )
| protected

## ◆ _getNormalizedCycle()

_getNormalizedCycle | ( |  | self,
|  |  | cycle )
| protected

## ◆ _getReferents()

_getReferents | ( |  | self,
|  |  | obj )
| protected

## ◆ _getReferrers()

_getReferrers | ( |  | self,
|  |  | obj )
| protected

## ◆ destroy()

destroy | ( |  | self | ) |

Reimplemented from Job.

## ◆ finished()

finished | ( |  | self | ) |

Reimplemented from Job.

## ◆ getDesc2numDict()

getDesc2numDict | ( |  | self | ) |

## ◆ getGarbage()

getGarbage | ( |  | self | ) |

## ◆ getNumCycles()

getNumCycles | ( |  | self | ) |

## ◆ getReport()

getReport | ( |  | self | ) |

## ◆ run()

run | ( |  | self | ) |

    This should be overridden with a generator that does the
    needful processing.

    yield `Job.Continue` when possible/reasonable, and try not to run
    longer than the JobManager's timeslice between yields.

    When done, yield `Job.Done`.

Reimplemented from Job.

## Member Data Documentation

## ◆ _args

_args
| protected

Initial value:
= ScratchPad(name=name, log=log, verbose=verbose, fullReport=fullReport,
findCycles=findCycles, doneCallback=doneCallback,
autoDestroy=autoDestroy, safeMode=safeMode, delOnly=delOnly,
collect=collect)

## ◆ _id2garbageInfo

_id2garbageInfo = {}
| protected

## ◆ _id2index

dict _id2index = {}
| protected

## ◆ _report

_report = s
| protected

## ◆ _reportStr

str _reportStr = ''
| protected

## ◆ cycleIds

cycleIds = set()

## ◆ cycles

list cycles = []

## ◆ cyclesBySyntax

cyclesBySyntax = []

## ◆ garbage

garbage = gc.garbage[:]

## ◆ garbageInstanceIds

garbageInstanceIds = set()

## ◆ notify

notify = directNotify.newCategory("GarbageReport")
| static

## ◆ numCycles

numCycles = len(self.cycles)

## ◆ numGarbage

numGarbage = len(self.garbage)

## ◆ numGarbageInstances

numGarbageInstances = len(garbageInstances)

## ◆ referentsByNumber

dict referentsByNumber = {}

## ◆ referentsByReference

dict referentsByReference = {}

## ◆ referrersByNumber

dict referrersByNumber = {}

## ◆ referrersByReference

dict referrersByReference = {}

## ◆ uniqueCycleSets

uniqueCycleSets = set()