util

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

Copyright 2025 The KubeFleet Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	LoadTestApplyCountMetric = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "workload_apply_total",
		Help: "Total number of placement",
	}, []string{"concurrency", "numTargetCluster", "result"})

	ApplyLatencyCountMetric = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "apply_crp_latency_count",
		Help: "latency of placement",
	}, []string{"concurrency", "numTargetCluster", "latency"})

	LoadTestUpdateCountMetric = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "workload_update_total",
		Help: "Total number of placement updates",
	}, []string{"concurrency", "numTargetCluster", "result"})

	UpdateLatencyCountMetric = promauto.NewCounterVec(prometheus.CounterOpts{
		Name: "update_crp_latency_count",
		Help: "update of placement",
	}, []string{"concurrency", "numTargetCluster", "latency"})
)

Functions

func ApplyClusterScopeManifests

func ApplyClusterScopeManifests(ctx context.Context, hubClient client.Client) error

func CleanupAll

func CleanupAll(hubClient client.Client) error

func MeasureOnePlacement

func MeasureOnePlacement(ctx context.Context, hubClient client.Client, deadline, interval time.Duration, maxCurrentPlacement int, clusterNames ClusterNames, crpFile string, useTestResources *bool) error

func PrintTestMetrics

func PrintTestMetrics(useTestResources bool)

Types

type ClusterNames

type ClusterNames []string

func (*ClusterNames) Set

func (i *ClusterNames) Set(value string) error

func (*ClusterNames) String

func (i *ClusterNames) String() string

Jump to

Keyboard shortcuts

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