#779·Harmony

Evaluate opt-in method-call profiling using existing patch APIs

Author: pardeikeCreated Sep 8, 2026Updated Sep 8, 2026
Labelsenhancementneeds more info/work

Investigation for the Harmony 3 backlog.

A later #586 comment proposes observing method calls for timing and diagnostics. Harmony can already express many such scenarios with prefixes, postfixes, finalizers and explicit state.

Establish whether reusable examples or an external adapter solve the problem before adding instrumentation to the core.

Completion criteria:

  • Define a small real use case and compare an ordinary patch recipe with any proposed helper.
  • Specify recursion, concurrent calls, exceptions, cancellation and async/iterator execution lifetimes.
  • Measure enabled overhead and allocations, and ensure disabled instrumentation adds no per-call work.
  • Consider sampling, subscription lifetime and cleanup after unpatching.
  • Produce an example and an evidence-based decision about where the feature belongs.

No general profiling performance benefit has been verified. Per-call observation is separate from patch lifecycle notifications and logging delivery.

Follow-up to the exploratory proposal in #586. Existing execution semantics.