sqlregressionstore

package
v0.0.0-...-50fdeb8 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package sqlregressionstore implements the regression.Store interface on an SQL database backend.

To see the schema of the database used, see perf/sql/migrations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLRegressionStore

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

SQLRegressionStore implements the regression.Store interface.

func New

New returns a new *SQLRegressionStore.

We presume all migrations have been run against db before this function is called.

func (*SQLRegressionStore) DeleteByCommit

func (s *SQLRegressionStore) DeleteByCommit(ctx context.Context, num types.CommitNumber, tx pgx.Tx) error

DeleteByCommit implements the regression.Store interface. Deletes a regression via commit number.

func (*SQLRegressionStore) GetByIDs

func (s *SQLRegressionStore) GetByIDs(ctx context.Context, ids []string) ([]*regression.Regression, error)

Not implemented as old regression schema does not have id.

func (*SQLRegressionStore) GetNotificationId

func (s *SQLRegressionStore) GetNotificationId(ctx context.Context, commitNumber types.CommitNumber, alertID string) (string, error)

GetNotificationId returns the notificationID for the regression at the given commit for specific alert.

func (*SQLRegressionStore) GetOldestCommit

func (s *SQLRegressionStore) GetOldestCommit(ctx context.Context) (*types.CommitNumber, error)

GetOldestCommit implements the regression.Store interface. Gets the oldest commit in the table.

func (*SQLRegressionStore) GetRegressionsBySubName

func (s *SQLRegressionStore) GetRegressionsBySubName(ctx context.Context, sub_name string, limit int, offset int) ([]*regression.Regression, error)

Unimplemented: This function is implemented by regression2 store

func (*SQLRegressionStore) GetRegressionsToMigrate

func (s *SQLRegressionStore) GetRegressionsToMigrate(ctx context.Context, batchSize int) ([]*regression.Regression, error)

GetRegressionsToMigrate returns a set of regressions which are available to be migrated.

func (*SQLRegressionStore) MarkMigrated

func (s *SQLRegressionStore) MarkMigrated(ctx context.Context, regressionId string, commitNumber types.CommitNumber, alertID int64, tx pgx.Tx) error

MarkMigrated marks a specific row in the regressions table as migrated.

func (*SQLRegressionStore) Range

Range implements the regression.Store interface.

func (*SQLRegressionStore) SetHigh

func (s *SQLRegressionStore) SetHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, df *frame.FrameResponse, high *clustering2.ClusterSummary) (bool, string, error)

SetHigh implements the regression.Store interface.

func (*SQLRegressionStore) SetLow

SetLow implements the regression.Store interface.

func (*SQLRegressionStore) TriageHigh

func (s *SQLRegressionStore) TriageHigh(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error

TriageHigh implements the regression.Store interface.

func (*SQLRegressionStore) TriageLow

func (s *SQLRegressionStore) TriageLow(ctx context.Context, commitNumber types.CommitNumber, alertID string, tr regression.TriageStatus) error

TriageLow implements the regression.Store interface.

func (*SQLRegressionStore) Write

Write implements the regression.Store interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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