reporters

package
v0.24.10-one-receipt Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: AGPL-3.0 Imports: 25 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountReporter

type AccountReporter struct {
	Log   zerolog.Logger
	RWF   ReportWriterFactory
	Chain flow.Chain
}

AccountReporter iterates through registers keeping a map of register sizes reports on storage metrics

func (*AccountReporter) Name

func (r *AccountReporter) Name() string

func (*AccountReporter) Report

func (r *AccountReporter) Report(payload []ledger.Payload) error

type BalanceReporter

type BalanceReporter struct {
	Log   zerolog.Logger
	RWF   ReportWriterFactory
	Chain flow.Chain
	// contains filtered or unexported fields
}

BalanceReporter iterates through registers getting the location and balance of all FlowVaults

func (*BalanceReporter) Name

func (r *BalanceReporter) Name() string

func (*BalanceReporter) Report

func (r *BalanceReporter) Report(payload []ledger.Payload) error

Report creates a balance_report_*.json file that contains data on all FlowVaults in the state commitment. I recommend using gojq to browse through the data, because of the large uint64 numbers which jq won't be able to handle.

type EpochCounterReporter added in v0.23.3

type EpochCounterReporter struct {
	Chain flow.Chain
	Log   zerolog.Logger
}

EpochCounterReporter reports the current epoch counter from the FlowEpoch smart contract.

func (*EpochCounterReporter) Name added in v0.23.3

func (e *EpochCounterReporter) Name() string

func (*EpochCounterReporter) Report added in v0.23.3

func (e *EpochCounterReporter) Report(payload []ledger.Payload) error

type ReportFileWriter

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

func (*ReportFileWriter) Close

func (r *ReportFileWriter) Close()

func (*ReportFileWriter) Write

func (r *ReportFileWriter) Write(dataPoint interface{})

type ReportFileWriterFactory

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

func (*ReportFileWriterFactory) ReportWriter

func (r *ReportFileWriterFactory) ReportWriter(dataNamespace string) ReportWriter

type ReportNilWriter

type ReportNilWriter struct {
}

ReportNilWriter does nothing. Can be used as the final fallback writer

func (ReportNilWriter) Close

func (r ReportNilWriter) Close()

func (ReportNilWriter) Write

func (r ReportNilWriter) Write(_ interface{})

type ReportWriter

type ReportWriter interface {
	Write(dataPoint interface{})
	Close()
}

ReportWriter writes data from reports

func NewReportFileWriter

func NewReportFileWriter(fileName string, log zerolog.Logger) ReportWriter

type ReportWriterFactory

type ReportWriterFactory interface {
	ReportWriter(dataNamespace string) ReportWriter
}

TODO janezp: we should be able to swithch the report writer to write to a database.

func NewReportFileWriterFactory

func NewReportFileWriterFactory(outputDir string, log zerolog.Logger) ReportWriterFactory

Jump to

Keyboard shortcuts

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