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: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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