From d0350960b6bbba3679fbaa4208ce612092213d12 Mon Sep 17 00:00:00 2001 From: eveneast Date: Mon, 15 Apr 2024 14:47:25 +0800 Subject: [PATCH] Fix some comments Signed-off-by: eveneast --- pkg/metrics/metrics.go | 2 +- pkg/util/collections/includes_excludes.go | 4 ++-- test/e2e/backups/deletion.go | 2 +- test/perf/metrics/monitor.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkg/metrics/metrics.go b/pkg/metrics/metrics.go index 3e273a9fd..7a477e5f0 100644 --- a/pkg/metrics/metrics.go +++ b/pkg/metrics/metrics.go @@ -587,7 +587,7 @@ func (m *ServerMetrics) RemoveSchedule(scheduleName string) { } } -// InitSchedule initializes counter metrics for a node. +// InitMetricsForNode initializes counter metrics for a node. func (m *ServerMetrics) InitMetricsForNode(node string) { if c, ok := m.metrics[podVolumeBackupEnqueueTotal].(*prometheus.CounterVec); ok { c.WithLabelValues(node).Add(0) diff --git a/pkg/util/collections/includes_excludes.go b/pkg/util/collections/includes_excludes.go index f6ec54638..1cff16f3e 100644 --- a/pkg/util/collections/includes_excludes.go +++ b/pkg/util/collections/includes_excludes.go @@ -442,7 +442,7 @@ func generateIncludesExcludes(includes, excludes []string, mapFunc func(string) return res } -// generateScopedIncludesExcludes's function is similar with generateIncludesExcludes, +// generateScopedIncludesExcludes function is similar with generateIncludesExcludes, // but it's used for scoped Includes/Excludes. func generateScopedIncludesExcludes(namespacedIncludes, namespacedExcludes, clusterIncludes, clusterExcludes []string, mapFunc func(string, bool) string, nsIncludesExcludes IncludesExcludes, helper discovery.Helper, logger logrus.FieldLogger) *ScopeIncludesExcludes { res := newScopeIncludesExcludes(nsIncludesExcludes, helper, logger) @@ -508,7 +508,7 @@ func GetGlobalResourceIncludesExcludes(helper discovery.Helper, logger logrus.Fi return ret } -// GetScopeResourceIncludesExcludes's function is similar with GetResourceIncludesExcludes, +// GetScopeResourceIncludesExcludes function is similar with GetResourceIncludesExcludes, // but it's used for scoped Includes/Excludes, and can handle both cluster-scoped and namespace-scoped resources. func GetScopeResourceIncludesExcludes(helper discovery.Helper, logger logrus.FieldLogger, namespaceIncludes, namespaceExcludes, clusterIncludes, clusterExcludes []string, nsIncludesExcludes IncludesExcludes) *ScopeIncludesExcludes { ret := generateScopedIncludesExcludes( diff --git a/test/e2e/backups/deletion.go b/test/e2e/backups/deletion.go index 30fe4440f..10a9e09c0 100644 --- a/test/e2e/backups/deletion.go +++ b/test/e2e/backups/deletion.go @@ -83,7 +83,7 @@ func backup_deletion_test(useVolumeSnapshots bool) { }) } -// runUpgradeTests runs upgrade test on the provider by kibishii. +// runBackupDeletionTests runs upgrade test on the provider by kibishii. func runBackupDeletionTests(client TestClient, veleroCfg VeleroConfig, backupName, backupLocation string, useVolumeSnapshots bool, kibishiiDirectory string) error { if useVolumeSnapshots && veleroCfg.CloudProvider == "kind" { diff --git a/test/perf/metrics/monitor.go b/test/perf/metrics/monitor.go index f9032b38c..c98fd3013 100644 --- a/test/perf/metrics/monitor.go +++ b/test/perf/metrics/monitor.go @@ -70,7 +70,7 @@ func (m *MetricsCollector) UpdateMetrics() { } } -// UpdateMetrics periodically updates the one-time metrics for all metrics +// UpdateOneTimeMetrics periodically updates the one-time metrics for all metrics func (m *MetricsCollector) UpdateOneTimeMetrics() { // NotifyOneTimeMonitors notifies the one-time metrics about the metric for _, metric := range m.OneTimeMetrics {