MemoryLens

•
11
•

Profiles .NET application memory on demand over EventPipe to provide AI-actionable code fix recommendations.

MemoryLens is an on-demand memory profiling server designed for .NET applications that interfaces directly with AI coding assistants. By attaching to running .NET processes in-process over EventPipe—the runtime's native diagnostics channel—it captures heap state, counts, and sizes without requiring external profilers or heavy dependencies. It includes an automated rule engine that analyzes memory snapshots to identify leaks, undisposed resources, and allocation anti-patterns, equipping LLM agents to deliver precise, contextual code remediations.

Características Principales

01Configurable rule engine customizable via local project configuration files
0211 GitHub stars
03Snapshot comparison mode to isolate memory growth and identify leaks across workloads
04Zero-install in-process heap snapshot collection using .NET EventPipe diagnostics
05Automated detection of event handler leaks, unbounded collections, and undisposed objects
06Multiple distribution and execution options including NuGet, .NET global tool, npx, and Docker

Casos de Uso

01Comparing before-and-after memory snapshots to analyze allocation overhead under load
02Enabling AI coding agents like Claude Code to automatically recommend and apply code-level memory optimizations
03Investigating and resolving memory leaks in running .NET APIs or microservices during active debugging