From a988f08000a2207c256fa1dd174f8cbc5fd615a2 Mon Sep 17 00:00:00 2001 From: Liz Kammer Date: Mon, 13 Feb 2023 10:01:53 -0500 Subject: [PATCH] Add event handler for each mutator Collect additional metrics for individual mutators in order to understand impact of individual mutators. Test: m nothing Change-Id: Ic3ecb1e79a79dd665c9f60d29f0dfd3732481c2d --- context.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/context.go b/context.go index 534694b..6f27f0e 100644 --- a/context.go +++ b/context.go @@ -2820,6 +2820,8 @@ func (c *Context) runMutators(ctx context.Context, config interface{}) (deps []s pprof.Do(ctx, pprof.Labels("blueprint", "runMutators"), func(ctx context.Context) { for _, mutator := range c.mutatorInfo { pprof.Do(ctx, pprof.Labels("mutator", mutator.name), func(context.Context) { + c.BeginEvent(mutator.name) + defer c.EndEvent(mutator.name) var newDeps []string if mutator.topDownMutator != nil { newDeps, errs = c.runMutator(config, mutator, topDownMutator)