Tag

memory_profiler

0 views collected around this technical thread.

Python Programming Learning Circle
Python Programming Learning Circle
Feb 15, 2023 · Fundamentals

Methods for Monitoring Python Code Execution Time and Memory Usage

This article introduces four practical techniques for measuring Python code performance, including the built‑in time module, Jupyter’s %%time magic, line_profiler for per‑line timing, and memory_profiler for detailed memory consumption, complete with example code and interpretation of results.

JupyterPerformance Profilingline_profiler
0 likes · 7 min read
Methods for Monitoring Python Code Execution Time and Memory Usage
Python Programming Learning Circle
Python Programming Learning Circle
Feb 8, 2023 · Fundamentals

Measuring Execution Time and Memory Usage in Python

This article introduces four practical methods for monitoring Python code performance—using the built‑in time module, the %%time IPython magic, line_profiler for per‑line timing, and memory_profiler for detailed memory usage—complete with code examples and interpretation of results.

Performance ProfilingPythonTiming
0 likes · 7 min read
Measuring Execution Time and Memory Usage in Python
Python Programming Learning Circle
Python Programming Learning Circle
Dec 20, 2021 · Artificial Intelligence

Monitoring Python CPU and GPU Memory Usage with memory_profiler and Pytorch‑Memory‑Utils

This article introduces the Python libraries memory_profiler and Pytorch‑Memory‑Utils, demonstrates how to measure line‑by‑line CPU memory consumption and GPU memory usage in notebooks and scripts, and explains the additional overhead introduced by PyTorch during model loading.

GPUMemory ProfilingPyTorch
0 likes · 7 min read
Monitoring Python CPU and GPU Memory Usage with memory_profiler and Pytorch‑Memory‑Utils