Documentation
¶
Overview ¶
Package analytics defines all analytics tooling.
Index ¶
- Constants
- func CtpAnalyticsBQClient(ctx context.Context) *bigquery.Client
- func InsertCTPMetrics(c *bigquery.Client, data []*BqData) error
- func InsertCTPTaskMetrics(c *bigquery.Client, data []*TaskData) error
- func ReadDurationMetrics(c *bigquery.Client, harness string, ctx context.Context) (map[string]float64, error)
- func SoftInsertStepWCtp2Req(ctx context.Context, BQClient *bigquery.Client, data *BqData, ...)
- func SoftInsertStepWInternalPlan(ctx context.Context, BQClient *bigquery.Client, data *BqData, ...)
- func SoftInsertStepWTrReq(ctx context.Context, BQClient *bigquery.Client, data *TaskData, ...)
- func SoftInsertStepWTrReqBulk(ctx context.Context, BQClient *bigquery.Client, td []*TaskData)
- type BqData
- type TaskData
Constants ¶
const Fail = "FAIL"
const Panic = "PANIC"
const Start = "START"
const Success = "SUCCESS"
Variables ¶
This section is empty.
Functions ¶
func CtpAnalyticsBQClient ¶
CtpAnalyticsBQClient will build the client for the CTP BQ tables, using the default CTP SA
func InsertCTPMetrics ¶
InsertCTPMetrics will insert the CTP Analytics Data into the CTPv2Metrics Table.
func InsertCTPTaskMetrics ¶
InsertCTPTaskMetrics will insert the CTP Analytics Data into the CTPv2TaskMetrics Table.
func ReadDurationMetrics ¶
func ReadDurationMetrics(c *bigquery.Client, harness string, ctx context.Context) (map[string]float64, error)
ReadDurationMetrics will query the duration cache table, and return a map of the test results. If a board is provided and not "", it will limit the results to that board.
func SoftInsertStepWCtp2Req ¶
func SoftInsertStepWCtp2Req(ctx context.Context, BQClient *bigquery.Client, data *BqData, ctpv2Req *api.CTPv2Request, build *build.State, v1Req *api.CTPRequest)
SoftInsertStepWCtp2Req insert a step info to BQl built from the CTPv2Request req. Do not fail on errors.
func SoftInsertStepWInternalPlan ¶
func SoftInsertStepWInternalPlan(ctx context.Context, BQClient *bigquery.Client, data *BqData, req *api.InternalTestplan, build *build.State)
SoftInsertStepWInternalPlan insert a step info to BQl built from the InternalTestPlan req. Do not fail on errors.