internal

package
v0.0.0-...-211bdf1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateDataPoint

func GenerateDataPoint(entity string, date time.Time, value float64) *metricdata.DataPoint[float64]

func GenerateMetrics

func GenerateMetrics(metricName string, dataPoints []metricdata.DataPoint[float64]) *metricdata.Metrics

func GenerateResourceMetrics

func GenerateResourceMetrics(metrics []metricdata.Metrics) *metricdata.ResourceMetrics

func Run

func Run()

Types

type BenchmarkReport

type BenchmarkReport struct {
	MetricNames     []string
	ResourceMetrics metricdata.ResourceMetrics
	ReportData      map[string]string
}

func (*BenchmarkReport) FetchReports

func (b *BenchmarkReport) FetchReports(ctx context.Context, timeframe []string, commitCache, reportCache SingleFileCache, githubService RepoSource)

func (*BenchmarkReport) GenerateReport

func (b *BenchmarkReport) GenerateReport(timeframe []string)

type FileContents

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

func (*FileContents) ToString

func (fc *FileContents) ToString() string

type GithubService

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

func (*GithubService) GetFileContentsAtCommit

func (gs *GithubService) GetFileContentsAtCommit(ctx context.Context, sha string) FileContents

func (*GithubService) GetMostRecentCommitSHA

func (gs *GithubService) GetMostRecentCommitSHA(ctx context.Context, timestamp time.Time, branch string) string

type RepoSource

type RepoSource interface {
	GetMostRecentCommitSHA(ctx context.Context, timestamp time.Time, branch string) string
	GetFileContentsAtCommit(ctx context.Context, sha string) FileContents
}

type ReportMetrics

type ReportMetrics struct {
	Date    time.Time
	Metrics map[string]map[string]float64
}

func ParseReport

func ParseReport(report string) ReportMetrics

type SingleFileCache

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

func NewSingleFileCache

func NewSingleFileCache(location string) *SingleFileCache

func (*SingleFileCache) AddToCache

func (c *SingleFileCache) AddToCache(key string, value string) error

func (*SingleFileCache) DeleteCache

func (c *SingleFileCache) DeleteCache() error

func (*SingleFileCache) RetrieveValue

func (c *SingleFileCache) RetrieveValue(key string) (string, error)

Jump to

Keyboard shortcuts

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