internal

package
v0.0.0-...-f11594e Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LatencyDistributionCollector = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "ws",
		Subsystem: "request",
		Name:      "latency_distribution",
		Help:      "μs",
		Buckets:   []float64{5, 10, 50, 100, 500, 1000},
	}, []string{"application"})

	LatencyPercentileCollector = prometheus.NewSummaryVec(prometheus.SummaryOpts{
		Namespace: "ws",
		Subsystem: "request",
		Name:      "latency_percentile",
		Help:      "",
		Objectives: map[float64]float64{
			0.5:  0.05,
			0.9:  0.01,
			0.99: 0.001,
		},
	}, []string{"application"})
)
View Source
var (
	AlphabetNumeric = &RandomString{
		layout: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",
		r:      rand.New(rand.NewSource(time.Now().UnixNano())),
		mu:     sync.Mutex{},
	}

	Numeric = &RandomString{
		layout: "0123456789",
		r:      rand.New(rand.NewSource(time.Now().UnixNano())),
		mu:     sync.Mutex{},
	}
)

Functions

func SetNumCPU

func SetNumCPU()

Types

type RandomString

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

func (*RandomString) Generate

func (c *RandomString) Generate(n int) []byte

func (*RandomString) Intn

func (c *RandomString) Intn(n int) int

func (*RandomString) Uint32

func (c *RandomString) Uint32() uint32

Jump to

Keyboard shortcuts

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