sampler

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Sampler

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

Sampler samples the requests, out of 100 sample calls, 100*sampleRate calls will be sampled.

func NewSampler

func NewSampler(sampleRate float64) (*Sampler, error)

NewSampler creates a new sampler with a sample rate.

func (*Sampler) Sample

func (t *Sampler) Sample() bool

Sample returns true when the call is sampled.

Jump to

Keyboard shortcuts

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