module documentation

Profiling support for unit and performance tests.

These are special purpose profiling methods which operate in a more fine-grained way than nose's profiling plugin.

Variable c​Profile Undocumented
Class ​Profile​Stats​File Store per-platform/fn profiling results in a file.
Function ​_start​_current​_test Undocumented
Function count​_functions Undocumented
Function function​_call​_count Assert a target for a test case's function call count.
Variable ​_current​_test String id of current test.
Variable ​_profile​_stats global ProfileStatsFileInstance.
cProfile =

Undocumented

def _start_current_test(id_):

Undocumented

@contextlib.contextmanager
def count_functions(variance=0.05):

Undocumented

def function_call_count(variance=0.05, times=1, warmup=0):

Assert a target for a test case's function call count.

The main purpose of this assertion is to detect changes in callcounts for various functions - the actual number is not as important. Callcounts are stored in a file keyed to Python version and OS platform information. This file is generated automatically for new tests, and versioned so that unexpected changes in callcounts will be detected.

_current_test =

String id of current test.

plugin_base assigns this at the start of each test using _start_current_test.

_profile_stats =

global ProfileStatsFileInstance.

plugin_base assigns this at the start of all tests.