Skip to content

ProfileUtil

Canonical path: TestHelper.ProfileUtil.ProfileUtil

Profiler utility class

profile staticmethod

profile(
    function: Callable,
    *param: Any,
    calls_to_print: int = 20,
    description: str = "",
    show_graphical_results: bool = False,
    profiler_type: ProfilerType = ProfilerType.C_PROFILE,
    show_separator_line: bool = False,
    result_file_name: str = ""
) -> Any

profile by cprofile

Parameters:

  • function (Callable) –

    function to execute

  • *param (Any, default: () ) –

    function parameter

  • calls_to_print (int, default: 20 ) –

    number of calls shown in the profile report (only for C_Profile)

  • description (str, default: '' ) –

    description of the text

  • show_graphical_results (bool, default: False ) –

    show graphical results (only for C_Profile)

  • profiler_type (ProfilerType, default: C_PROFILE ) –

    type of the profiler

  • show_separator_line (bool, default: False ) –

    show a separator line before the results

  • result_file_name (str, default: '' ) –

    name of the result file

Returns:

  • Any

    return value of the call function

Placeholder