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 ¶
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
Click to show internal directories.
Click to hide internal directories.