queriesjson

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

queriesjson package contains the logic for collecting queries.json information

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRowsToSet

func AddRowsToSet(queriesrows []QueriesRow, profilesToCollect map[string]string) map[string]string

Types

type QueriesRow

type QueriesRow struct {
	QueryID string `json:"queryId"`
	// Context       string `json:"context"`
	QueryText string  `json:"queryText"`
	Start     float64 `json:"start"`
	// Finish        int64  `json:"finish"`
	Outcome string `json:"outcome"`
	// OutcomeReason string `json:"outcomeReason"`
	// Username      string `json:"username"`
	// InputRecords  int    `json:"inputRecords"`
	// InputBytes    int    `json:"inputBytes"`
	// OutputRecords int    `json:"outputRecords"`
	// OutputBytes   int    `json:"outputBytes"`
	// RequestType   string `json:"requestType"`
	QueryType string `json:"queryType"`
	// ParentsList             []any  `json:"parentsList"`
	// Accelerated             bool   `json:"accelerated"`
	// ReflectionRelationships []any  `json:"reflectionRelationships"`
	QueryCost float64 `json:"queryCost"`
	// QueueName               string `json:"queueName"`
	// PoolWaitTime            int    `json:"poolWaitTime"`
	// PendingTime             int    `json:"pendingTime"`
	// MetadataRetrievalTime   int    `json:"metadataRetrievalTime"`
	// PlanningTime            int    `json:"planningTime"`
	// EngineStartTime         int    `json:"engineStartTime"`
	// QueuedTime              int    `json:"queuedTime"`
	ExecutionPlanningTime float64 `json:"executionPlanningTime"`
	// StartingTime            int    `json:"startingTime"`
	RunningTime float64 `json:"runningTime"`
}

func CollectQueriesJSON

func CollectQueriesJSON(queriesjsons []string) []QueriesRow

func GetHighCostJobs

func GetHighCostJobs(queriesrows []QueriesRow, limit int) []QueriesRow

func GetRecentErrorJobs

func GetRecentErrorJobs(queriesrows []QueriesRow, limit int) []QueriesRow

func GetSlowExecJobs

func GetSlowExecJobs(queriesrows []QueriesRow, limit int) []QueriesRow

func GetSlowPlanningJobs

func GetSlowPlanningJobs(queriesrows []QueriesRow, limit int) []QueriesRow

func ReadGzFile

func ReadGzFile(filename string) ([]QueriesRow, error)

func ReadJSONFile

func ReadJSONFile(filename string) ([]QueriesRow, error)

Jump to

Keyboard shortcuts

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