Skip to content

Commit 0839265

Browse files
Nisugisnperry85claude
authored
feat(memory_profiler.lic): v1.0.0 cross-platform memory profiling script (elanthia-online#2154)
## Summary - Adds new `memory_profiler.lic` script for tracking object allocations and memory growth - Cross-platform support: Windows, Linux, and macOS - Commands: snapshot, compare, top, gc, system, fragtest, trend, trim ## Features - **Snapshot/Compare**: Track memory growth over time by comparing snapshots - **System breakdown**: Detailed memory gap analysis showing what's consuming memory outside Ruby heap - **Fragmentation test**: Determine if memory gap is due to malloc fragmentation vs actual leak - **Trend analysis**: Track memory growth rate with projections - **Platform-specific APIs**: - Windows: WMI, Toolhelp32 for threads/memory - Linux: /proc filesystem, malloc_trim - macOS: libproc (proc_pid_rusage, proc_pidinfo), Activity Monitor-style metrics `;memory system` has been tested on windows 11 and ubuntu so far. <!-- ELLIPSIS_HIDDEN --> ---- > [!IMPORTANT] > Introduces `memory_profiler.lic` script for cross-platform memory profiling with commands for memory analysis and platform-specific support for Windows, Linux, and macOS. > > - **Behavior**: > - Adds `memory_profiler.lic` script for memory profiling with commands: `snapshot`, `compare`, `top`, `gc`, `system`, `fragtest`, `trend`, `trim`. > - Supports Windows, Linux, macOS using platform-specific APIs. > - **Features**: > - `snapshot` and `compare` for tracking memory growth. > - `system` for detailed memory breakdown outside Ruby heap. > - `fragtest` to test for malloc fragmentation vs leaks. > - `trend` for memory growth rate analysis. > - **Platform APIs**: > - Windows: WMI, Toolhelp32 for memory/thread data. > - Linux: `/proc` filesystem, `malloc_trim`. > - macOS: `libproc`, Activity Monitor metrics. > - **Testing**: > - Tested on Windows 11 and Ubuntu. > > <sup>This description was created by </sup>[<img alt="Ellipsis" src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=elanthia-online%2Fscripts&utm_source=github&utm_medium=referral)<sup> for c5675bf. You can [customize](https://app.ellipsis.dev/elanthia-online/settings/summaries) this summary. It will automatically update as commits are pushed.</sup> <!-- ELLIPSIS_HIDDEN --> --------- Co-authored-by: snperry85 <snperry85@gmail.com> Co-authored-by: Claude <noreply@anthropic.com>
1 parent ee8bee4 commit 0839265

1 file changed

Lines changed: 2065 additions & 0 deletions

File tree

0 commit comments

Comments
 (0)