lincc-frameworks / lincc-frameworks/iops-profiler

Expose detailed I/O data via magic variable

Open
#47 0 comments 1 reaction 2 assignees View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.