This is a really simple project build to track the performance of your go program. No InfluxDB BS which I am sick of configuring. The objective is to run your program and the go metrics gets saved to the JSON file and after the run the simple program generates a static HTML.
- It's as easy as
import (
metrics "github.com/Akilan1999/Go-Metrics-Simple"
)
func main() {
// Add this to the starting point of your go program
err := metrics.RunCollector(metrics.DefaultConfig)
// <Your Go program here>
// Add this to the end point of your go program
metrics.ComputeDefaultFile()
}
- After your program is complete just open
metrics.html
file (The image below is just sample metrics of the/example
code. :