reporter

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathReport string

PathReport represent path of the report file

Functions

func GenerateAllReports

func GenerateAllReports(dbs []*store.StorageClassDB) error

GenerateAllReports generates reports of types HTML and Text

func GenerateFunctionalReport

func GenerateFunctionalReport(db store.Store, reportTypes []ReportType) error

GenerateFunctionalReport generates functions reports

func GenerateReports

func GenerateReports(reportTypes []ReportType, dbs []*store.StorageClassDB) error

GenerateReports generates reports of type HTML and Text

func GenerateReportsFromMultipleDBs

func GenerateReportsFromMultipleDBs(reportTypes []ReportType, scDBs []*store.StorageClassDB) error

GenerateReportsFromMultipleDBs generates reports from multiple DBs

Types

type HTMLReporter

type HTMLReporter struct{}

HTMLReporter is used to create and manage HTML report

func (*HTMLReporter) Generate

func (hr *HTMLReporter) Generate(runName string, mc *collector.MetricsCollection) error

Generate generates a HTML report

type MultiReporter

type MultiReporter interface {
	MultiGenerate(mc []*collector.MetricsCollection) error
}

MultiReporter is an interface for generating multiple type of reports

type PlotPath

type PlotPath struct {
	Path       string
	ReportName string
}

PlotPath holds report name and path

func (*PlotPath) HTML

func (pp *PlotPath) HTML() template.URL

HTML formats HTML report path

func (*PlotPath) Txt

func (pp *PlotPath) Txt() string

Txt formats the Text report path

type ReportType

type ReportType string

ReportType represent types of report to be generated

const (
	// HTMLReport represents HTML report
	HTMLReport ReportType = "HTML"
	// TextReport represents Text report
	TextReport ReportType = "TEXT"
)
const TabularReport ReportType = "TABLE"

TabularReport represents TABLE report type

const XMLReport ReportType = "XML"

XMLReport represents XML report type

type Reporter

type Reporter interface {
	Generate(runName string, mc *collector.MetricsCollection) error
}

Reporter is an interface for generating reports

type TabularReporter

type TabularReporter struct{}

TabularReporter is used to create and manage report in a tabular form

func (*TabularReporter) Generate

Generate generates report for a metrics collection

func (*TabularReporter) MultiGenerate

func (tr *TabularReporter) MultiGenerate(mcs []*collector.MetricsCollection) error

MultiGenerate generates reports for multiple metrics collections

type TextReporter

type TextReporter struct{}

TextReporter is used to create and manage Text report

func (*TextReporter) Generate

func (tr *TextReporter) Generate(runName string, mc *collector.MetricsCollection) error

Generate text report for metrics collection

type XMLReporter

type XMLReporter struct{}

XMLReporter is used to create and manage XML report

func (*XMLReporter) Generate

func (xr *XMLReporter) Generate(_ string, mc *collector.MetricsCollection) error

Generate generates report from metrics collection

func (*XMLReporter) MultiGenerate

func (xr *XMLReporter) MultiGenerate(mcs []*collector.MetricsCollection) error

MultiGenerate generates report from multiple metrics collection

Jump to

Keyboard shortcuts

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