datadog-go icon indicating copy to clipboard operation
datadog-go copied to clipboard

add time measurement with a func callback

Open grosser opened this issue 7 years ago • 2 comments

func Time(name, fn func()) that reports how long something took

... I can make a PR for it unless there is a reason this is not wanted @truthbk ...

grosser avatar Nov 02 '18 17:11 grosser

Hi @grosser,

I don't see anything wrong with doing this apart from a probable performance hit. Feel free to open a PR if you are still interested.

Arthur

arbll avatar Nov 28 '19 19:11 arbll

I'd love this, most of the time we're measuring time anyway, so having a utility function like this would help a lot :slightly_smiling_face:

any idea if that PR will be merged?

cyberhck avatar May 28 '21 11:05 cyberhck