reports

package
v0.56.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: BSD-2-Clause, BSD-3-Clause, PostgreSQL Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupportedReports = []string{"bloat", "buffercache", "vacuum", "sequence"}

Functions

This section is empty.

Types

type BloatReport

type BloatReport struct {
	ReportRunID string
	CollectedAt time.Time
	Data        state.PostgresBloatStats
}

BloatReport - Report on table and index bloat

func (BloatReport) ReportType

func (report BloatReport) ReportType() string

ReportType - Returns the type of the report as a string

func (*BloatReport) Result

func (report *BloatReport) Result() *pganalyze_collector.Report

Result of the report

func (*BloatReport) Run

func (report *BloatReport) Run(ctx context.Context, server *state.Server, logger *util.Logger, connection *sql.DB) (err error)

Run the report

func (BloatReport) RunID

func (report BloatReport) RunID() string

RunID - Returns the ID of this report run

type BuffercacheReport

type BuffercacheReport struct {
	ReportRunID string
	CollectedAt time.Time
	Data        state.PostgresBuffercache
}

BuffercacheReport - Report on the Postgres buffer cache

func (BuffercacheReport) ReportType

func (report BuffercacheReport) ReportType() string

ReportType - Returns the type of the report as a string

func (*BuffercacheReport) Result

func (report *BuffercacheReport) Result() *pganalyze_collector.Report

Result of the report

func (*BuffercacheReport) Run

func (report *BuffercacheReport) Run(ctx context.Context, server *state.Server, logger *util.Logger, connection *sql.DB) (err error)

Run the report

func (BuffercacheReport) RunID

func (report BuffercacheReport) RunID() string

RunID - Returns the ID of this report run

type Report

type Report interface {
	RunID() string
	ReportType() string
	Run(ctx context.Context, server *state.Server, logger *util.Logger, connection *sql.DB) error
	Result() *pganalyze_collector.Report
}

func InitializeReport

func InitializeReport(reportType string, reportRunID string) (Report, error)

type SequenceReport

type SequenceReport struct {
	ReportRunID string
	CollectedAt time.Time
	Data        state.PostgresSequenceReport
}

VacuumReport - Report on sequence statistics

func (SequenceReport) ReportType

func (report SequenceReport) ReportType() string

ReportType - Returns the type of the report as a string

func (*SequenceReport) Result

func (report *SequenceReport) Result() *pganalyze_collector.Report

Result of the report

func (*SequenceReport) Run

func (report *SequenceReport) Run(ctx context.Context, server *state.Server, logger *util.Logger, connection *sql.DB) (err error)

Run the report

func (SequenceReport) RunID

func (report SequenceReport) RunID() string

RunID - Returns the ID of this report run

type VacuumReport

type VacuumReport struct {
	ReportRunID string
	CollectedAt time.Time
	Data        state.PostgresVacuumStats
}

VacuumReport - Report on table vacuum statistics

func (VacuumReport) ReportType

func (report VacuumReport) ReportType() string

ReportType - Returns the type of the report as a string

func (*VacuumReport) Result

func (report *VacuumReport) Result() *pganalyze_collector.Report

Result of the report

func (*VacuumReport) Run

func (report *VacuumReport) Run(ctx context.Context, server *state.Server, logger *util.Logger, connection *sql.DB) (err error)

Run the report

func (VacuumReport) RunID

func (report VacuumReport) RunID() string

RunID - Returns the ID of this report run

Jump to

Keyboard shortcuts

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