testing

package
v0.0.0-...-80377ec Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

metrics unit tests

Index

Constants

View Source
const MetricCreateRequest = `` /* 160-byte string literal not displayed */

MetricCreateRequest represents a request to create a metric.

View Source
const MetricCreateResponse = `` /* 433-byte string literal not displayed */

MetricCreateResponse represents a raw server responce to the MetricCreateRequest.

View Source
const MetricGetResult = `` /* 1554-byte string literal not displayed */

MetricGetResult represents a raw server response from a server to a get request.

View Source
const MetricsListResult = `` /* 2160-byte string literal not displayed */

MetricsListResult represents a raw server response from a server to a list call.

Variables

View Source
var Metric1 = metrics.Metric{
	ArchivePolicy: archivepolicies.ArchivePolicy{
		AggregationMethods: []string{
			"max",
			"min",
		},
		BackWindow: 0,
		Definition: []archivepolicies.ArchivePolicyDefinition{
			{
				Granularity: "1:00:00",
				Points:      2304,
				TimeSpan:    "96 days, 0:00:00",
			},
			{
				Granularity: "0:05:00",
				Points:      9216,
				TimeSpan:    "32 days, 0:00:00",
			},
			{
				Granularity: "1 day, 0:00:00",
				Points:      400,
				TimeSpan:    "400 days, 0:00:00",
			},
		},
		Name: "precise",
	},
	CreatedByProjectID: "e9dc821ca664406e981820a477e9a761",
	CreatedByUserID:    "a23c5b98d42d4df3b961e54d5167eb6d",
	Creator:            "a23c5b98d42d4df3b961e54d5167eb6d:e9dc821ca664406e981820a477e9a761",
	ID:                 "777a01d6-4694-49cb-b86a-5ba9fd4e609e",
	Name:               "memory.usage",
	ResourceID:         "1f3a0724-1807-4bd1-81f9-ee18c8ff6ccc",
	Unit:               "MB",
}

Metric1 is an expected representation of a first metric from the MetricsListResult.

View Source
var Metric2 = metrics.Metric{
	ArchivePolicy: archivepolicies.ArchivePolicy{
		AggregationMethods: []string{
			"mean",
			"sum",
		},
		BackWindow: 12,
		Definition: []archivepolicies.ArchivePolicyDefinition{
			{
				Granularity: "1:00:00",
				Points:      2160,
				TimeSpan:    "90 days, 0:00:00",
			},
			{
				Granularity: "1 day, 0:00:00",
				Points:      200,
				TimeSpan:    "200 days, 0:00:00",
			},
		},
		Name: "not_so_precise",
	},
	CreatedByProjectID: "c6b68a6b413648b0a0eb191bf3222f4d",
	CreatedByUserID:    "cb072aacdb494419aeeba5f1c62d1a65",
	Creator:            "cb072aacdb494419aeeba5f1c62d1a65:c6b68a6b413648b0a0eb191bf3222f4d",
	ID:                 "6dbc97c5-bfdf-47a2-b184-02e7fa348d21",
	Name:               "cpu.delta",
	ResourceID:         "c5dc0c47-f43c-425c-a82f-44d61ee91175",
	Unit:               "ns",
}

Metric2 is an expected representation of a second metric from the MetricsListResult.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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