ProfileResult#

class scikitplot._ipymagic.ProfileResult(rows, total_calls, total_time, sort, limit, functions, stats_file=None)[source]#

A profile of a statement or cell, displayed as a table.

Parameters:
rowstuple of ProfileRow

The top functions, sorted by sort.

total_callsint

Function calls recorded.

total_timefloat

Seconds recorded (the profiler’s own clock).

sortstr

Sort key ("cumulative", "tottime", "ncalls").

limitint

Rows kept.

functionsint

Distinct functions recorded (rows beyond limit included).

stats_filestr or None, default=None

Where the pstats data was written, if anywhere.

Parameters:
functions: int[source]#
limit: int[source]#
rows: tuple[ProfileRow, ...][source]#
sort: str[source]#
stats_file: str | None = None#
to_dict()[source]#

Return the profile as plain data (JSON-serialisable).

Returns:
dict

Every field; rows as mappings.

Return type:

dict[str, Any]

to_text()[source]#

Return the profile as a fixed-width table.

Returns:
str

A header line, column titles, one line per row.

Return type:

str

total_calls: int[source]#
total_time: float[source]#