From c501908af1b5afc0aed6fe9bf06060c9961545c6 Mon Sep 17 00:00:00 2001 From: Vince Foley <39946+binaryseed@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:05:23 -0800 Subject: [PATCH] Apply suggestions from code review --- lib/new_relic/sampler/beam.ex | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/new_relic/sampler/beam.ex b/lib/new_relic/sampler/beam.ex index c0b587ef..dd902009 100644 --- a/lib/new_relic/sampler/beam.ex +++ b/lib/new_relic/sampler/beam.ex @@ -96,13 +96,12 @@ defmodule NewRelic.Sampler.Beam do end defp delta(:util, previous, current) do - {active, total} = + {_, {active, total}} = Enum.zip(previous, current) |> Enum.map_reduce({0, 0}, fn {{n, a0, t0}, {n, a1, t1}}, {acc_a, acc_t} -> {{n, a1 - a0, t1 - t0}, {acc_a + (a1 - a0), acc_t + (t1 - t0)}} end) - |> elem(1) safe_div(active, total) end