Package schrodinger :: Package infra :: Module mmcheck :: Class _CCodeProfiler
[hide private]
[frames] | no frames]

Class _CCodeProfiler

A class for profiling the time spent in C functions. Its main usefulness is in getting relative timings among the C functions.

Use of this class is enabled by setting the SCHRODINGER_PYTHON_CPROFILE environment variable to any value.

It works by giving each wrapped C function a python wrapper with a unique name so they can be distinguished in the profile. Obviously, this will add more overhead to each C function call, so expect profiles to show a greater time spent in C wrappers than normal.

Instance Methods [hide private]
 
__init__(self, fn)
 
__call__(self, *args)