tests.profiling.utils_yappi

Wrapper for the YAPPI profiler

Classes

class tests.profiling.utils_yappi.YappiProfiler(name, print_to_console=False)

Bases: Profiler

Thread-safe handler for the YAPPI profiler

Parameters:
  • name (str)

  • print_to_console (bool)

Functions

tests.profiling.utils_yappi.process(name, print_to_console=False)

Get stats from YAPPI and return them as str

Parameters:
  • name (str)

  • print_to_console (bool)

Return type:

Tuple[YFuncStats, YThreadStats]

tests.profiling.utils_yappi.process_text(stats, path=None, print_to_console=False, columns=None)

Convert YAPPI stats to str

Parameters:
  • stats (YFuncStats | YThreadStats)

  • path (str)

  • print_to_console (bool)

  • columns (Dict[int, Tuple[str, int]])

Return type:

str

tests.profiling.utils_yappi.process_text_func(stats, path, print_to_console=False)

Convert YAPPI function stats to str

Parameters:
  • stats (YFuncStats)

  • path (str)

  • print_to_console (bool)

Return type:

str

tests.profiling.utils_yappi.process_text_thread(stats, path, print_to_console=False)

Convert YAPPI thread stats to str

Parameters:
  • stats (YThreadStats)

  • path (str)

  • print_to_console (bool)

Return type:

str