From 0988b76a781c3a5a9645d583bb2e038d51c79c06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 15 May 2023 09:23:26 +0200 Subject: [PATCH] Add a counter helper --- common/types/types.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/types/types.go b/common/types/types.go index cee497bf4..c36c51b3e 100644 --- a/common/types/types.go +++ b/common/types/types.go @@ -17,6 +17,7 @@ package types import ( "fmt" "reflect" + "sync/atomic" "github.com/spf13/cast" ) @@ -90,3 +91,6 @@ func IsNil(v any) bool { type DevMarker interface { DevOnly() } + +// This is only used for debugging purposes. +var InvocationCounter atomic.Int64