Skip to content

Commit 55853a1

Browse files
committed
docs: add CONTRIBUTING.md
1 parent 6fd8ee8 commit 55853a1

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Contributing
2+
3+
## Build & test
4+
5+
rdmatop is Linux-only (netlink + sysfs). CI runs exactly:
6+
7+
```bash
8+
cargo build --release
9+
cargo test
10+
cargo fmt --check
11+
cargo clippy -- -D warnings
12+
```
13+
14+
Hardware-dependent tests are `#[ignore]`d; on a machine with RDMA NICs or
15+
GPUs also run `cargo test -- --ignored`. To verify the TUI under load, use
16+
the traffic generators in `examples/` and cross-check rates against an
17+
independent source (`ethtool -S`, `amd-smi xgmi`, `nvidia-smi nvlink`).
18+
19+
## Ground rules
20+
21+
- Never crash the TUI over missing hardware — sampling degrades to empty
22+
rows / `None` fields.
23+
- Detect hardware at runtime (`dlopen`), not via cargo features.
24+
- Verify what vendor APIs actually return on real hardware before trusting
25+
them; leave a short comment citing the observed behavior.
26+
- Comments: 1–3 lines, explain *why*. New code mirrors its neighbors
27+
(e.g. a new backend follows `src/nvlink.rs` / `src/xgmi.rs`).
28+
29+
## Pull requests
30+
31+
- One logical change per PR; conventional title (`feat:`, `fix:`, `perf:`,
32+
`docs:`, `refactor:`).
33+
- Fill in the PR template with a real test plan and pasted output. If you
34+
couldn't test on hardware, say so and explain what you verified instead.
35+
- New behavior needs tests: unit tests for pure logic, an `#[ignore]`d
36+
smoke test for hardware paths.
37+
38+
## Bug reports
39+
40+
Include: rdmatop version, OS/kernel + driver stack (rdma-core, ROCm, NVIDIA
41+
driver), hardware models, a screenshot or pasted TUI output, and expected vs
42+
actual behavior.

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ communication benchmarks:
8484
3. **Process detection**`RDMA_NLDEV_CMD_RES_QP_GET` to map QPs → PIDs, enriched with `/proc` data
8585
4. **Throughput** — Two snapshots per interval, delta / elapsed for rates
8686

87+
## Contributing
88+
89+
See [CONTRIBUTING.md](CONTRIBUTING.md) for build/test instructions,
90+
design ground rules, and how to submit changes.
91+
8792
## License
8893

8994
Apache-2.0

0 commit comments

Comments
 (0)