Example Notebooks
These Jupyter notebooks demonstrate the key features of iops-profiler with practical, hands-on examples.
Notebooks
Running the Notebooks
You can run these notebooks in several ways:
View Online: The notebooks are rendered as part of this documentation
Download and Run Locally:
>> git clone https://github.com/lincc-frameworks/iops-profiler.git >> cd iops-profiler/docs/notebooks >> jupyter notebook
Prerequisites
Before running the notebooks, make sure you have:
Python 3.10 or higher
Jupyter Notebook or JupyterLab installed
iops-profiler installed (
pip install iops-profiler)
The notebooks will handle creating and cleaning up temporary files automatically.
Notebook Descriptions
Basic Usage
Learn the fundamentals of iops-profiler:
Loading the extension
Using line magic (
%iops) for single-line profilingUsing cell magic (
%%iops) for multi-line profilingUnderstanding the results table
Comparing different I/O strategies
Working with text and binary files
Recommended for: First-time users and those wanting a quick introduction.
Histogram Visualization
Explore the histogram feature for visualizing I/O patterns:
Enabling histogram mode with
--histogramUnderstanding operation count and bytes distributions
Analyzing read vs. write patterns
Optimizing buffer sizes based on histograms
Working with mixed operation sizes
Real-world examples (CSV files, etc.)
Recommended for: Users who want to understand and optimize I/O operation distributions.
Note: Histogram mode is available on Linux and macOS, but not Windows.
Additional Resources
After working through the notebooks, check out:
User Guide for detailed feature documentation
Platform-Specific Notes for platform-specific tips
Troubleshooting if you encounter issues
You can also find more examples in the project’s GitHub repository.