Skip to content

jojomi/minprofile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minprofile

Minimum golang profiling library. Get a quick overview of where time is spent in your code.

Godoc Documentation Build Status Go Report Card Coverage Status

Install

go get github.com/jojomi/minprofile

Usage

import (
  "github.com/jojomi/minprofile"
)

p := minprofile.NewStarted()
time.Sleep(1100 * time.Millisecond) // actually here should be your application code
p.StepP("hard task finished")
time.Sleep(250 * time.Millisecond) // actually here should be your application code
p.StepP("easy task finished")

Default output channel is os.Stdout, but can be configured using Profile.OutputWriter.

Output

Example output from above:

PROF: Σ=1.1001571s, Δ=1.1001571s   (hard task finished)
PROF: Σ=1.3501727s, Δ=250.0156ms   (easy task finished)

About

Minimal golang profiling library. Get a quick overview of where time is spent in your code.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages