https://github.com/serpent7776/crawlio
Tool that slows down I/O operations
https://github.com/serpent7776/crawlio
dev slow testing tool
Last synced: 27 days ago
JSON representation
Tool that slows down I/O operations
- Host: GitHub
- URL: https://github.com/serpent7776/crawlio
- Owner: serpent7776
- Created: 2025-05-14T19:56:45.000Z (5 months ago)
- Default Branch: master
- Last Pushed: 2025-05-17T16:27:03.000Z (5 months ago)
- Last Synced: 2025-06-26T04:36:14.690Z (4 months ago)
- Topics: dev, slow, testing, tool
- Language: C
- Homepage:
- Size: 2.93 KB
- Stars: 21
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Crawlio
Crawlio is a system call interceptor that slows down I/O operations by adding configurable sleep durations to common I/O operations (read, write, open, and close).
Some of possible use cases:
- Testing application behavior under slow I/O conditions
- Slowing down applications that produce large amounts of output
- Bringing back the dial-up nostalgia## Usage
```sh
crawlio [options] -- program [args...]
```- `-h, --help`: Show help message
- `-a, --all-sleep MS`: Set sleep duration for all syscalls (in milliseconds)
- `-r, --read-sleep MS`: Set sleep duration for read syscalls (in milliseconds)
- `-w, --write-sleep MS`: Set sleep duration for write syscalls (in milliseconds)
- `-o, --open-sleep MS`: Set sleep duration for open syscalls (in milliseconds)
- `-c, --close-sleep MS`: Set sleep duration for close syscalls (in milliseconds)
- `-l, --lib PATH`: Path to the crawlio.so library (default: crawlio.so)## Examples
```sh
# Add 25ms delay to all supported syscalls when running vim
crawlio -a 25 -- vim# Add different delays for read (50ms) and write (100ms) operations
crawlio -r 50 -w 100 -- cat /etc/passwd# Add 200ms delay to file open operations
crawlio -o 200 -- find / -name '*.txt'
```## Building and installing
Build:
```sh
make
```Install (by default installs to /usr/local):
```sh
make install
```Uninstall:
```sh
make uninstall
```## How It Works
Crawlio uses the `LD_PRELOAD` mechanism to override certain system calls and inject configurable delays before each operation. It can currently override the following calls:
`read()`, `write()`, `open()`, `close()`