perf

package
v2.7.0-RC3+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2018 License: Apache-2.0, BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package perf is to add performance measuring hooks to a runner, such as cpu, or trace profiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableProfCaptureHook

func EnableProfCaptureHook(name string, opts ...string)

EnableProfCaptureHook actives a registered profile capture hook for a given pipeline.

func EnableTraceCaptureHook

func EnableTraceCaptureHook(name string, opts ...string)

EnableTraceCaptureHook actives a registered profile capture hook for a given pipeline.

func RegisterProfCaptureHook

func RegisterProfCaptureHook(name string, c CaptureHookFactory)

RegisterProfCaptureHook registers a CaptureHookFactory for the supplied identifier. It panics if the same identifier is registered twice.

func RegisterTraceCaptureHook

func RegisterTraceCaptureHook(name string, c CaptureHookFactory)

RegisterTraceCaptureHook registers a CaptureHookFactory for the supplied identifier. It panics if the same identifier is registered twice.

Types

type CaptureHook

type CaptureHook func(context.Context, string, io.Reader) error

CaptureHook is used by the harness to have the runner persist a trace record with the supplied name and comment. The type of trace can be determined by the prefix of the string.

* prof: A profile compatible with traces produced by runtime/pprof * trace: A trace compatible with traces produced by runtime/trace

type CaptureHookFactory

type CaptureHookFactory func([]string) CaptureHook

CaptureHookFactory creates a CaptureHook from the supplied options.

Jump to

Keyboard shortcuts

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