Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metrics to measure processing time #499

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Conversation

masa213f
Copy link
Contributor

@masa213f masa213f commented Jan 27, 2023

Add metrics to measure the processing time of cluster-manager goroutines.
It may be helpful with performance tuning.

Name Type
moco_cluster_processing_time_seconds histogram

With this change, the moco-controller will expose the following metrics.

$ curl -sS localhost:8080/metrics | grep processing_time
# HELP moco_cluster_processing_time_seconds The length of time in seconds processing the cluster
# TYPE moco_cluster_processing_time_seconds histogram
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="0.1"} 7
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="0.25"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="0.5"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="0.75"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="1"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="2.5"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="5"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="7.5"} 19
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="10"} 23
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="20"} 23
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="30"} 23
moco_cluster_processing_time_seconds_bucket{name="cluster1",namespace="foo",le="+Inf"} 23
moco_cluster_processing_time_seconds_sum{name="cluster1",namespace="foo"} 38.11477838000001
moco_cluster_processing_time_seconds_count{name="cluster1",namespace="foo"} 23
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="0.1"} 11
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="0.25"} 65
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="0.5"} 65
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="0.75"} 66
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="1"} 66
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="2.5"} 66
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="5"} 66
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="7.5"} 66
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="10"} 73
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="20"} 73
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="30"} 73
moco_cluster_processing_time_seconds_bucket{name="cluster2",namespace="bar",le="+Inf"} 73
moco_cluster_processing_time_seconds_sum{name="cluster2",namespace="bar"} 70.92830542099993
moco_cluster_processing_time_seconds_count{name="cluster2",namespace="bar"} 73

Signed-off-by: Masayuki Ishii masa213f@gmail.com

@masa213f masa213f self-assigned this Jan 27, 2023
Signed-off-by: Masayuki Ishii <masa213f@gmail.com>
@masa213f masa213f force-pushed the processing-time-metrics branch from 9f348e2 to cffe9c4 Compare January 27, 2023 02:39
@masa213f masa213f marked this pull request as ready for review January 27, 2023 09:01
@masa213f masa213f merged commit bfa0d14 into main Jan 30, 2023
@masa213f masa213f deleted the processing-time-metrics branch January 30, 2023 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants