Documentation ¶
Overview ¶
Example ¶
nolint:govet
package main import ( "context" "os" "github.com/takuoki/golib/monitoring" ) // nolint:govet func main() { ctx := context.Background() ctx = monitoring.Record(ctx, "main start") defer func() { ctx = monitoring.Record(ctx, "main end") monitoring.Output(ctx, os.Stdout, nil) }() foo(ctx)
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Output ¶
func Output(ctx context.Context, w io.Writer, formatFunc OutputFormatFunc)
Output outputs a record of memory usage. If `formatFunc` == nil, the output will be in the default format.
func OutputFile ¶
func OutputFile(ctx context.Context, dirPath string, formatFunc OutputFormatFunc) error
OutputFile outputs a memory usage record to a file. The file is output to the specified directory with the file name `YYYYMMDDTHHmmss.md`. If `formatFunc` == nil, the output will be in the default format.
Types ¶
Click to show internal directories.
Click to hide internal directories.