metricsperf

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 8 Imported by: 0

README

Metrics And Perf Collection Package

  • Performance profile collection: perf.go
  • Metrics collection
    • HTTP requests - TODO
    • Database - TODO

Documentation

Index

Constants

View Source
const (
	MIN_SAVE_PERIOD = 20 * time.Second
)

Variables

This section is empty.

Functions

func StartPeriodicPerfProfilesCollection

func StartPeriodicPerfProfilesCollection(ctx *core.Context, conf PerfDataCollectionConfig) (stopChan chan struct{}, _ error)

StartPeriodicPerfProfilesCollection starts a goroutine that collect several profiles: CPU, MEM, Mutex, goroutine stack trace. Every conf.Period the profiles are saved, stopChan should be written to & stopped by the caller.

Types

type PerfDataCollectionConfig

type PerfDataCollectionConfig struct {
	// this duration is truncated to the second
	ProfileSavePeriod time.Duration

	Bucket s3_ns.OpenBucketWithCredentialsInput
}

Jump to

Keyboard shortcuts

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