Profiler

Profiling class for updated information on process status

class DIRAC.Core.Utilities.Profiler.Profiler(pid=None)

Bases: object

Class for profiling both general stats about a machine and individual processes. Every instance of this class is associated to a single process by using its PID. Calls to the different methods of the class will return the current state of the process.

__init__(pid=None)
Parameters:

pid (str) – PID of the process to be profiled

cpuPercentage(**kwargs)
cpuUsageSystem(**kwargs)
cpuUsageUser(**kwargs)
getAllProcessData(withChildren=False, withTerminatedChildren=False)

Returns data available about a process

memoryUsage(**kwargs)
numThreads(**kwargs)
pid()

Returns the process PID

runningTime(**kwargs)
status(**kwargs)
vSizeUsage(**kwargs)
DIRAC.Core.Utilities.Profiler.checkInvocation(func)

Decorator for invoking psutil methods