func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
	oomCountByHost, ramUsageByHost := cc.ClusterManager.ReallyExpensiveAssessmentOfTheSystemState()
	for host, oomCount := range oomCountByHost {
		ch <- prometheus.MustNewConstMetric(
			oomCountDesc,
			prometheus.CounterValue,
			float64(oomCount),
			host,
		)
	}
	for host, ramUsage := range ramUsageByHost {
		ch <- prometheus.MustNewConstMetric(
			ramUsageDesc,
			prometheus.GaugeValue,
			ramUsage,
			host,
		)
	}
}
// Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState. Then it
// creates constant metrics for each host on the fly based on the returned data.
//
// Note that Collect could be called concurrently, so we depend on
// ReallyExpensiveAssessmentOfTheSystemState to be concurrency-safe.
Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState. Then it
creates constant metrics for each host on the fly based on the returned data.

Note that Collect could be called concurrently, so we depend on
ReallyExpensiveAssessmentOfTheSystemState to be concurrency-safe.
// Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState . Then it // creates constant metrics for each host on the fly based on the returned data . // // Note that Collect could be called concurrently so we depend on // ReallyExpensiveAssessmentOfTheSystemState to be concurrency - safe .
func (cc ClusterManagerCollector) Collect(ch chan<- prometheus.Metric) {
	oomCountByHost, ramUsageByHost := cc.ClusterManager.ReallyExpensiveAssessmentOfTheSystemState()
	for host, oomCount := range oomCountByHost {
		ch <- prometheus.MustNewConstMetric(
			oomCountDesc,
			prometheus.CounterValue,
			float64(oomCount),
			host,
		)
	}
	for host, ramUsage := range ramUsageByHost {
		ch <- prometheus.MustNewConstMetric(
			ramUsageDesc,
			prometheus.GaugeValue,
			ramUsage,
			host,
		)
	}
}
func ( cc ClusterManagerCollector ) Collect ( ch chan <- prometheus . Metric ) { oomCountByHost , ramUsageByHost := cc . ClusterManager . ReallyExpensiveAssessmentOfTheSystemState ( ) for host , oomCount := range oomCountByHost { ch <- prometheus . MustNewConstMetric ( oomCountDesc , prometheus . CounterValue , float64 ( oomCount ) , host , ) } for host , ramUsage := range ramUsageByHost { ch <- prometheus . MustNewConstMetric ( ramUsageDesc , prometheus . GaugeValue , ramUsage , host , ) } }
Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState.
Collect first triggers the ReallyExpensiveAssessmentOfTheSystemState .