tracker

package
v1.6.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TrackFunctionTime

func TrackFunctionTime(start time.Time, msg string)

TrackFunctionTime is a function that tracks the time it takes to execute a function and logs the time it took to execute the function

It takes a time.Time object and a string as parameters The time.Time object is the time the function started executing The string is the name of the function that is being tracked (or any arbitrary message useful for logging)

It is intended to be run at the beginning of a function and defer the function call for example:

func someFunction() {
	start := time.Now()
	defer TrackFunctionTime(start, "someFunction")
	// do stuff
}

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL