extractors

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartExtractor

type ChartExtractor struct {
	// ProcessName is the name of the process that the memory is referring to
	ProcessName string
	// Filename is the file to which it extracts the chart
	Filename string
	// Data is the memory usage data
	Data []ProcessStatsData
	// From is when the chart was created
	From time.Time
	// To is when the chart stopped watching for more data
	To                     time.Time
	UpdateLiveListenWSHost string
}

func NewChartExtractor

func NewChartExtractor(opts ChartExtractorOptions) *ChartExtractor

func (*ChartExtractor) Add

func (m *ChartExtractor) Add(data ProcessStatsData) error

func (*ChartExtractor) AddCpuLineLiveUpdateJSFuncs added in v0.5.1

func (m *ChartExtractor) AddCpuLineLiveUpdateJSFuncs(line *charts.Line)

func (*ChartExtractor) AddMemoryLineLiveUpdateJSFuncs added in v0.5.1

func (m *ChartExtractor) AddMemoryLineLiveUpdateJSFuncs(line *charts.Line)

func (*ChartExtractor) DivideTimeIntoParts

func (m *ChartExtractor) DivideTimeIntoParts(parts int) []string

DivideTimeIntoParts returns a string formatted time that is divided into parts

func (*ChartExtractor) StopAndExtract

func (m *ChartExtractor) StopAndExtract() error

type ChartExtractorOptions

type ChartExtractorOptions struct {
	ProcessName            string
	Filename               string
	UpdateLiveListenWSHost string
}

func NewChartExtractorOptions

func NewChartExtractorOptions(processname string, filename string) ChartExtractorOptions

func (*ChartExtractorOptions) UpdateLive added in v0.5.1

func (o *ChartExtractorOptions) UpdateLive(host string) *ChartExtractorOptions

type CpuUsageData

type CpuUsageData struct {
	Percentage float32
}

type CsvMemoryUsage

type CsvMemoryUsage struct {
	Filename string
	Data     []ProcessStatsData
	// contains filtered or unexported fields
}

func NewCsvMemoryUsageExtractor

func NewCsvMemoryUsageExtractor(filename string) (*CsvMemoryUsage, error)

func (*CsvMemoryUsage) Add

func (c *CsvMemoryUsage) Add(data ProcessStatsData) error

func (*CsvMemoryUsage) StopAndExtract

func (c *CsvMemoryUsage) StopAndExtract() error

type CsvMemoryUsageExtractorOptions

type CsvMemoryUsageExtractorOptions struct {
	Filename string
}

func NewCsvExtractorOptions

func NewCsvExtractorOptions(filename string) CsvMemoryUsageExtractorOptions

type Extractor

type Extractor interface {
	Add(data ProcessStatsData) error
	StopAndExtract() error
}

type Extractors

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

func NewExtractors

func NewExtractors(opts ...interface{}) Extractors

func (*Extractors) Add

func (m *Extractors) Add(d ProcessStatsData) error

func (*Extractors) StopAndExtract

func (m *Extractors) StopAndExtract() error

type MemoryUsageData

type MemoryUsageData struct {
	Rss     int64
	RssSwap int64
}

type ProcessStatsData

type ProcessStatsData struct {
	MemoryUsage MemoryUsageData
	CpuUsage    CpuUsageData
	Timestamp   time.Time
}

Jump to

Keyboard shortcuts

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