memonitor

Cross-platform memory profiler

Pure Nim score 30/100 · tests present · docs generated

Summary

Latest Version Unknown
License MIT
CI Status Passing
Downloads 0
Last Indexed 2026-07-22 05:28

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 - - - - - - -

README

memonitor

Test Nimble Directory

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