lincc-frameworks / lincc-frameworks/iops-profiler
Expose detailed I/O data via magic variable
@mtauraso is already working on this.
Since Jan 29, 2026.
- Dominant language
- Python
- Stars
- 6
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
## Expose detailed I/O data via magic variable
### Implementation
After `%%iops` execution, inject a variable `iops_detailed_data` into the user's namespace via:
```python
self.shell.user_ns['iops_detailed_data'] = detailed_data
```
### Variable Content
**When detailed data is available** (strace/fs_usage modes):
- Type: `pandas.DataFrame`
- Columns:
- `path` (str): File path
- `operation` (str): "read" or "write"
- `syscall` (str, optional): Syscall name if available
- `size_bytes` (int): Bytes transferred
**When detailed data is NOT available** (psutil mode):
- Type: `str`
- Value: `"Detailed I/O data not available: profiling uses psutil mode which only provides aggregate metrics"`
### Documentation
Add a brief note to README.md showing users can access `iops_detailed_data` after running `%%iops`.
### Example
```python
%%iops
with open('test.txt', 'w') as f:
f.write('data')
```
Next cell:
```python
iops_detailed_data # Access the DataFrame
```
Also update readthedocs.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.