memoryusage

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: BSD-2-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package memoryusage holds the routines which manage the file_summary_by_instance table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wrapper

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

Wrapper wraps a FileIoLatency struct representing the contents of the data collected from file_summary_by_instance, but adding formatting for presentation in the terminal

func NewMemoryUsage

func NewMemoryUsage(cfg *config.Config, db *sql.DB) *Wrapper

NewMemoryUsage creates a wrapper around MemoryUsage

func (*Wrapper) Collect

func (muw *Wrapper) Collect()

Collect data from the db, then merge it in.

func (Wrapper) Description

func (muw Wrapper) Description() string

Description returns a description of the table

func (Wrapper) EmptyRowContent

func (muw Wrapper) EmptyRowContent() string

EmptyRowContent returns an empty string of data (for filling in)

func (Wrapper) FirstCollectTime

func (muw Wrapper) FirstCollectTime() time.Time

FirstCollectTime returns the time the first value was collected

func (Wrapper) HaveRelativeStats

func (muw Wrapper) HaveRelativeStats() bool

HaveRelativeStats is true for this object

func (Wrapper) Headings

func (muw Wrapper) Headings() string

Headings returns the headings for a table

func (Wrapper) LastCollectTime

func (muw Wrapper) LastCollectTime() time.Time

LastCollectTime returns the time the last value was collected

func (Wrapper) Len

func (muw Wrapper) Len() int

Len return the length of the result set

func (*Wrapper) ResetStatistics added in v1.1.0

func (muw *Wrapper) ResetStatistics()

ResetStatistics resets the statistics to last values

func (Wrapper) RowContent

func (muw Wrapper) RowContent() []string

RowContent returns the rows we need for displaying

func (Wrapper) TotalRowContent

func (muw Wrapper) TotalRowContent() string

TotalRowContent returns all the totals

func (Wrapper) WantRelativeStats

func (muw Wrapper) WantRelativeStats() bool

WantRelativeStats indiates if we want relative statistics

Jump to

Keyboard shortcuts

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