Performance Counters

336 views
Skip to first unread message

Mark Richman

unread,
Aug 29, 2016, 12:34:26 AM8/29/16
to golang-nuts
I'm relatively new to Go, coming from a Windows/.NET background primarily. Does the Go runtime itself offer performance counters similar to what Windows makes available via perfmon? Specifically, I'm looking to capture realtime (not via a dump) metrics on heap usage, thread counts, GC collections, HTTP queue length, etc.

Diego Medina

unread,
Aug 29, 2016, 2:07:34 PM8/29/16
to golang-nuts

Hi,

You may want to look at


If your app is already running the built in server, you can 

import _ "expvar"

and then you will see a lot of internal counters at

localhost:6060/debug/vars

you can then add your own counters to it, which will also be displayed under that same url


Here is a blog post about integrating it datadog (you can use any monitoring tool you wish though)


Hope that's what you were looking for.

Thanks

Diego

Mark Richman

unread,
Aug 29, 2016, 9:02:51 PM8/29/16
to golang-nuts
Thanks Diego! I will check it out. Looks like it's what I'm after.
Reply all
Reply to author
Forward
0 new messages