How it works
The plugin orchestrates the full profiling loop on your behalf. You describe the problem; Metreja instruments your app, captures a trace, and hands the analysis back to the agent.
Tell the agent what's slow, what's allocating too much, or what you want to compare.
Metreja creates an isolated session config with the right filters for your codebase.
The profiler DLL attaches to your .NET runtime and captures method-level timing and allocation events.
The agent reads the NDJSON output and identifies hotspots, call trees, or memory pressure.
The agent explains the root cause and suggests a concrete code change, backed by numbers.
Run again, diff the traces. The agent confirms whether the change actually helped.
Why Metreja
Your agent profiles as part of fixing the problem. The full measure-analyze-fix loop runs without human intervention.
Self-time analysis pinpoints the method that's actually slow, not the one that calls it. No more chasing callers up the stack.
Excessive allocations, GC thrashing, memory pressure. See which types allocate the most and which methods trigger gen2 collections.
Diff two traces. See the numbers. No guessing whether your change helped — analyze-diff gives you hard evidence.
Filter by assembly, namespace, or class. Framework noise stays out, overhead stays low. Signal, not noise.
Session configs are isolated files. Re-run the same investigation anytime. Share sessions with teammates or your agent.
Under the hood
The plugin orchestrates five commands. Every output is machine-readable NDJSON — designed to be consumed by an agent, not a human. You can also run the CLI directly if you need to.
full CLI reference →| Command | What it does |
|---|---|
| metreja hotspots | Rank methods by self time, call count, or allocations |
| metreja calltree | Expand a slow method into its full call tree |
| metreja callers | Find who calls a method and how much time each contributes |
| metreja memory | GC counts, pause times, per-type allocation hotspots |
| metreja analyze-diff | Compare two traces to verify a fix actually improved performance |