memonitor
Cross-platform memory profiler
Summary
| Latest Version | Unknown |
|---|---|
| License | MIT |
| CI Status | Passing |
| Downloads | 0 |
| Last Indexed | 2026-07-22 05:28 |
Tags
Installation
nimble install memonitor
choosenim install memonitor
git clone https://github.com/quadram-institute-bioscience/memonitor
OS Compatibility
| Platform | Linux | macOS | Windows | FreeBSD | OpenBSD | NetBSD | Android | iOS | WASM | Embedded |
|---|---|---|---|---|---|---|---|---|---|---|
| memonitor | ✓ | ✓ | ✓ | - | - | - | - | - | - | - |
Source
| Repository | https://github.com/quadram-institute-bioscience/memonitor |
|---|---|
| Homepage | https://github.com/quadram-institute-bioscience/memonitor |
| Documentation | View Documentation |
| Registry Source | nimble_official |
README
memonitor
Features
- Monitor process memory usage
- Format memory values with appropriate units (MB/GB)
- Works on Linux, macOS, and Windows
Installation
nimble install memonitor
Usage
import memonitor
# Get complete memory information
let memInfo = getMemInfo()
echo "Process uses: ", memInfo.processRamMB, " MB"
echo "System has: ", memInfo.freeRamMB, " MB free of ", memInfo.totalRamMB, " MB total"
echo "System memory usage: ", memInfo.usedSystemPercent, "%"
# Format memory values with appropriate units
echo "Process RAM: ", formatMemMB(memInfo.processRamMB) # "500.50 MB" or "1.25 GB"
# Monitor memory usage around an operation
withMemoryMonitoring:
var data = newSeq[int](1_000_000) # Allocate some memory
# ... do memory-intensive work ...
API Documentation
Generate documentation with:
nimble docs
Running Tests
nimble test
License
MIT