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 metric ext_cpu_total_distribute for local state #315

Conversation

shijieqin
Copy link
Collaborator

add metric ext_cpu_total_distribute for local state

@github-actions
Copy link
Contributor

github-actions bot commented May 14, 2022

🎉 Successfully Build Images.

Overview: https://finops.coding.net/public-artifacts/gocrane/crane/packages

Image Pull Command
crane-agent:pr-315-a19070e docker pull finops-docker.pkg.coding.net/gocrane/crane/crane-agent:pr-315-a19070e
dashboard:pr-315-a19070e docker pull finops-docker.pkg.coding.net/gocrane/crane/dashboard:pr-315-a19070e
metric-adapter:pr-315-a19070e docker pull finops-docker.pkg.coding.net/gocrane/crane/metric-adapter:pr-315-a19070e
craned:pr-315-a19070e docker pull finops-docker.pkg.coding.net/gocrane/crane/craned:pr-315-a19070e

@shijieqin shijieqin force-pushed the add_ext_cpu_total_distribute_metrics_for_local_state branch from f651770 to 6fb275b Compare May 16, 2022 03:00
@xieydd xieydd requested a review from kitianFresh May 18, 2022 01:29
@yan234280533
Copy link

yan234280533 commented May 18, 2022

Can you give an example for how to use the "ext_cpu_total_distribute" metric? @shijieqin

@@ -179,6 +180,13 @@ func (s *StateCollector) UpdateCollectors() {
if _, exists := s.collectors.Load(types.CadvisorCollectorType); !exists {
s.collectors.Store(types.CadvisorCollectorType, cadvisor.NewCadvisorCollector(s.podLister, s.GetCadvisorManager()))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the node resource feature disabled, we can not collect the metric, can we add a judge for it

pkg/ensurance/collector/noderesource/noderesource.go Outdated Show resolved Hide resolved
@shijieqin shijieqin force-pushed the add_ext_cpu_total_distribute_metrics_for_local_state branch from 6fb275b to a19070e Compare May 20, 2022 07:03
@shijieqin
Copy link
Collaborator Author

Can you give an example for how to use the "ext_cpu_total_distribute" metric? @shijieqin

I added a NodeQOSEnsurancePolicy called disablescheduling-when-ext-cpu-total-distribute
In examples.

@yan234280533
Copy link

/LGTM

@yan234280533 yan234280533 merged commit b3f8896 into gocrane:main May 20, 2022
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