Documentation

Overview

Package diagnosis brings feature of aah application profiling to do various diagnosis. It support HTTP and File (upcoming) modes.

Documentation and sample config refer to https://docs.aahframework.org/diagnosis.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnosis

type Diagnosis struct {
	Config *config.Config
	Mode   string
	// contains filtered or unexported fields
}

Diagnosis brings feature of aah application profiling to do various diagnosis. It support HTTP and File (upcoming) modes.

Documentation and sample config refer to https://docs.aahframework.org/diagnosis.html

func New

func New(appName string, appCfg *config.Config, al log.Loggerer) (*Diagnosis, error)

New method creates new Diagnosis instance to collection various insights of application. Such as heap, profile, block, trace and mutex.

Basically all capabilities supported by `runtime/pprof` and `runtime/trace` brought into HTTP or File mode collection.

func (*Diagnosis) IsHTTPMode

func (d *Diagnosis) IsHTTPMode() bool

IsHTTPMode method returns true if diagnosis enabled in HTTP mode otherwise false.

func (*Diagnosis) Run

func (d *Diagnosis) Run()

Run method runs diagnosis solutions on current aah application based on given diagnosis configuration on application startup.

func (*Diagnosis) Stop

func (d *Diagnosis) Stop()

Stop method to stop the diagnosis profiles, server and close file descriptors.