Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Design] Design approach to track Metrics #73

Open
TanmoySG opened this issue Feb 21, 2023 · 1 comment
Open

[Design] Design approach to track Metrics #73

TanmoySG opened this issue Feb 21, 2023 · 1 comment

Comments

@TanmoySG
Copy link
Owner

Design approach to track various metrics for

  • each route/actions
  • performance metrics for overall
  • system metrics
  • RAM/Memory usage and CPU Usage
@TanmoySG
Copy link
Owner Author

Time Tracking for functions

func timeTrack(start time.Time, name string) {
	elapsed := time.Since(start)
	log.Printf("%s took %s", name, elapsed)
}

// usage in function 

func SomeFunction(empIDs []string) string {
	defer timeTrack(time.Now(), "someFunction")
}

Output
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant