iops_profiler
IOPS Profiler - Jupyter Magic for measuring I/O operations per second
Submodules
Attributes
Classes
IPython magic commands for profiling I/O operations per second (IOPS). |
Functions
|
Load the extension |
|
Unload the extension |
Package Contents
- class IOPSProfiler(shell)[source]
Bases:
IPython.core.magic.MagicsIPython magic commands for profiling I/O operations per second (IOPS).
Provides %iops (line magic) and %%iops (cell magic) commands to measure I/O performance of Python code in Jupyter notebooks.
- platform = 'linux'
- collector
- _profile_code(code, show_histogram=False)[source]
Internal method to profile code with I/O measurements.
- Parameters:
code – The code string to profile
show_histogram – Whether to generate histograms
- Returns:
Dictionary with profiling results
- iops(line, cell=None)[source]
Measure I/O operations per second for code.
- Line magic usage (single line):
%iops open(‘test.txt’, ‘w’).write(‘data’) %iops –histogram open(‘test.txt’, ‘w’).write(‘data’)
- Cell magic usage (multiple lines):
%%iops # Your code here with open(‘test.txt’, ‘w’) as f:
f.write(‘data’)
%%iops –histogram # Your code here (with histograms) with open(‘test.txt’, ‘w’) as f:
f.write(‘data’)