timing

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

View Source
const (
	// DebugMessage is the log message output
	DebugMessage = "StageTimer finished"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StageTimer

type StageTimer struct {
	// contains filtered or unexported fields
}

StageTimer is a utility used for timing processes, sometimes in multiple stages, and logging the output at the end

func NewStageTimer

func NewStageTimer(processName string, extraFields log.Fields) StageTimer

NewStageTimer constructs a new StageTimer, and adds an initial stage called "start"

func (*StageTimer) Finish

func (s *StageTimer) Finish()

Finish adds a stage called "finish" and logs all of the durations

func (*StageTimer) Stage

func (s *StageTimer) Stage(stageName string)

Stage marks a delimiting point between sections of a timer

Jump to

Keyboard shortcuts

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