stormlog.tui.profiles

Helpers for exposing profile summaries inside the Textual TUI.

Functions

clear_pytorch_profiles()

Clear global PyTorch profile results.

clear_tensorflow_profiles()

Clear TensorFlow profile summaries if available.

fetch_pytorch_profiles([limit])

Return recent PyTorch profile rows.

fetch_tensorflow_profiles([limit])

Return aggregated TensorFlow profile summaries.

Classes

ProfileRow(name, peak_mb, delta_mb, ...)

Lightweight view model used by the TUI tables.

class stormlog.tui.profiles.ProfileRow(name, peak_mb, delta_mb, duration_ms, call_count, recorded_at)[source]

Bases: object

Lightweight view model used by the TUI tables.

Parameters:
  • name (str)

  • peak_mb (float)

  • delta_mb (float)

  • duration_ms (float)

  • call_count (int)

  • recorded_at (float)

name: str
peak_mb: float
delta_mb: float
duration_ms: float
call_count: int
recorded_at: float
stormlog.tui.profiles.fetch_pytorch_profiles(limit=15)[source]

Return recent PyTorch profile rows.

Parameters:

limit (int)

Return type:

List[ProfileRow]

stormlog.tui.profiles.clear_pytorch_profiles()[source]

Clear global PyTorch profile results.

Return type:

bool

stormlog.tui.profiles.fetch_tensorflow_profiles(limit=15)[source]

Return aggregated TensorFlow profile summaries.

Parameters:

limit (int)

Return type:

List[ProfileRow]

stormlog.tui.profiles.clear_tensorflow_profiles()[source]

Clear TensorFlow profile summaries if available.

Return type:

bool