models

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextualizedUsageMetrics

type ContextualizedUsageMetrics struct {
	Context    MetricsContext               `json:"context"`
	Types      map[string]*TypeMetrics      `json:"types"`
	Operations map[string]*OperationMetrics `json:"operations"`
}

func (*ContextualizedUsageMetrics) FindOperationMetrics

func (t *ContextualizedUsageMetrics) FindOperationMetrics(operationHash string) *OperationMetrics

func (*ContextualizedUsageMetrics) FindTypeMetrics

func (t *ContextualizedUsageMetrics) FindTypeMetrics(typeName string) *TypeMetrics

type FieldMetrics

type FieldMetrics struct {
	ReturnType string             `json:"returnType"`
	Count      int32              `json:"count"`
	ErrorCount int32              `json:"errorCount"`
	Histogram  *ddsketch.DDSketch `json:"-"`
}

func (*FieldMetrics) MarshalJSON

func (f *FieldMetrics) MarshalJSON() ([]byte, error)

type Histogram

type Histogram struct {
	Indexes []int16 `json:"indexes"`
	Counts  []int32 `json:"counts"`
}

type MetricsContext

type MetricsContext struct {
	ClientName    string `json:"clientName"`
	ClientVersion string `json:"clientVersion"`
	ServerVersion string `json:"serverVersion"`
}

type OperationDefinition

type OperationDefinition struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	Hash      string `json:"hash"`
	Signature string `json:"signature"`
}

type OperationMetrics

type OperationMetrics struct {
	Count      int32              `json:"count"`
	ErrorCount int32              `json:"errorCount"`
	Histogram  *ddsketch.DDSketch `json:"-"`
}

func (*OperationMetrics) MarshalJSON

func (f *OperationMetrics) MarshalJSON() ([]byte, error)

type TypeMetrics

type TypeMetrics struct {
	Fields map[string]*FieldMetrics `json:"fields"`
}

func (*TypeMetrics) FindFieldMetrics

func (t *TypeMetrics) FindFieldMetrics(fieldName string) *FieldMetrics

type UsageDefinitions

type UsageDefinitions struct {
	Timestamp  time.Time             `json:"timestamp"`
	Operations []OperationDefinition `json:"operations"`
}

func NewUsageDefinitions

func NewUsageDefinitions() *UsageDefinitions

type UsageMetrics

type UsageMetrics struct {
	Timestamp time.Time                    `json:"timestamp"`
	Metrics   []ContextualizedUsageMetrics `json:"metrics"`
}

func NewUsageMetrics

func NewUsageMetrics() *UsageMetrics

func (*UsageMetrics) FindContextMetrics

func (u *UsageMetrics) FindContextMetrics(ClientName string, ClientVersion string, ServerVersion string) *ContextualizedUsageMetrics

Jump to

Keyboard shortcuts

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