table

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TransactionTableSortFieldSqlMap = map[string]string{
	columnReqCount.Key:    "sum(elapsed_count::field)",
	columnErrorCount.Key:  "sum(if(eq(error::tag, 'true'),elapsed_count::field,0))",
	columnAvgDuration.Key: "avg(elapsed_mean::field)",
}

Functions

This section is empty.

Types

type BaseBuildParams

type BaseBuildParams struct {
	SdkCtx    context.Context
	StartTime int64
	EndTime   int64
	TenantId  string
	ServiceId string
	Layer     common.TransactionLayerType
	LayerPath string
	FuzzyPath bool
	OrderBy   []*common.Sort
	PageSize  int
	PageNo    int
	Metric    metricpb.MetricServiceServer
}

type Builder

type Builder interface {
	GetTable(ctx context.Context) (*Table, error)
	GetBaseBuildParams() *BaseBuildParams
}

type Cell

type Cell struct {
	Key   string
	Value interface{}
}

type Column

type Column struct {
	Key      string
	Name     string
	Sortable bool
}

type ErrorTransactionTableBuilder

type ErrorTransactionTableBuilder struct {
	*BaseBuildParams
	MinDuration float64
	MaxDuration float64
}

func (*ErrorTransactionTableBuilder) GetBaseBuildParams

func (t *ErrorTransactionTableBuilder) GetBaseBuildParams() *BaseBuildParams

func (*ErrorTransactionTableBuilder) GetTable

type ErrorTransactionTableRow

type ErrorTransactionTableRow struct {
	OccurTime string
	Duration  string
	TraceId   string
}

func (*ErrorTransactionTableRow) GetCells

func (t *ErrorTransactionTableRow) GetCells() []*Cell

type Row

type Row interface {
	GetCells() []*Cell
}

type SlowTransactionTableBuilder

type SlowTransactionTableBuilder struct {
	*BaseBuildParams
	MinDuration float64
	MaxDuration float64
}

func (*SlowTransactionTableBuilder) GetBaseBuildParams

func (t *SlowTransactionTableBuilder) GetBaseBuildParams() *BaseBuildParams

func (*SlowTransactionTableBuilder) GetTable

func (t *SlowTransactionTableBuilder) GetTable(ctx context.Context) (*Table, error)

type SlowTransactionTableRow

type SlowTransactionTableRow struct {
	OccurTime string
	Duration  string
	TraceId   string
}

func (*SlowTransactionTableRow) GetCells

func (t *SlowTransactionTableRow) GetCells() []*Cell

type Table

type Table struct {
	Total   float64
	Columns []*Column
	Rows    []Row
}

type TransactionTableBuilder

type TransactionTableBuilder struct {
	*BaseBuildParams
}

func (*TransactionTableBuilder) GetBaseBuildParams

func (t *TransactionTableBuilder) GetBaseBuildParams() *BaseBuildParams

func (*TransactionTableBuilder) GetTable

func (t *TransactionTableBuilder) GetTable(ctx context.Context) (*Table, error)

type TransactionTableRow

type TransactionTableRow struct {
	TransactionName string
	ReqCount        float64
	ErrorCount      float64
	AvgDuration     string
}

func (*TransactionTableRow) GetCells

func (t *TransactionTableRow) GetCells() []*Cell

Jump to

Keyboard shortcuts

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