analyze

package
v0.0.0-...-cb364af Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyzer

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

Analyzer is in charge of analyzing the lambda logs

func New

func New(awsProfile string) *Analyzer

New creates a new instance of an Analyzer

func (*Analyzer) FetchBuckets

func (a *Analyzer) FetchBuckets(functionName string, startTime time.Time, timeout time.Duration) (map[int64]*Bucket, error)

FetchBuckets fetches the memory buckets found in logs

type Bucket

type Bucket struct {
	Size                  int64
	Count                 int
	DurationHist          *histogram.Fast
	MemoryHist            *histogram.Fast
	CountByBilledDuration map[int64]int64
}

Bucket has the information for a collection of requests associated to the same memory size

func (*Bucket) CalculateSuggestedMemory

func (b *Bucket) CalculateSuggestedMemory(percentile float64) int

CalculateSuggestedMemory returns a suggestion for optimizing the given percentile

func (*Bucket) Print

func (b *Bucket) Print(output io.Writer)

Print information associated with the bucket

type EventParser

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

EventParser is in charge of parsing the lambda logs

Jump to

Keyboard shortcuts

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