Categorygithub.com/Akilan1999/Go-Metrics-Simple
modulepackage
0.0.0-20220907145024-e4f994d17756
Repository: https://github.com/akilan1999/go-metrics-simple.git
Documentation: pkg.go.dev

# README

Go Metrics Simple

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.

based on the repo: github.com/tevjef/go-runtime-metrics

How to use it

  1. 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()
}

  1. After your program is complete just open metrics.html file (The image below is just sample metrics of the /examplecode. :

Screenshot 2022-09-02 at 22 37 27

# Packages

No description provided by the author
No description provided by the author

# Functions

No description provided by the author
ComputeDefaultFile Plot based on the default file which is results1.json.
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

DefaultConfig A configuration with default values.

# Structs

No description provided by the author
No description provided by the author
MetricsAllSingleRun Basic struct with file information.
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author