Rename CalculateProcessScoreboard to CountProcessState

This commit is contained in:
Enrico Stahn 2018-02-27 19:35:45 +11:00
parent 1066444ca1
commit 3ada457d13
No known key found for this signature in database
GPG key ID: 5263621C269A50DE
2 changed files with 3 additions and 3 deletions

View file

@ -178,7 +178,7 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
continue continue
} }
pps := CalculateProcessScoreboard(pool) pps := CountProcessState(pool)
if !e.CalculateProcessScoreboard && (pps.Active() != pool.ActiveProcesses || pps.Idle != pool.IdleProcesses) { if !e.CalculateProcessScoreboard && (pps.Active() != pool.ActiveProcesses || pps.Idle != pool.IdleProcesses) {
log.Error("Inconsistent active and idle processes reported. Set `--fix-process-count` to have this calculated by php-fpm_exporter instead.") log.Error("Inconsistent active and idle processes reported. Set `--fix-process-count` to have this calculated by php-fpm_exporter instead.")
} }

View file

@ -202,8 +202,8 @@ func (pps *PoolProcessStateCounter) Total() int64 {
return pps.Idle + pps.Active() return pps.Idle + pps.Active()
} }
// CalculateProcessScoreboard creates a scoreboard with the calculated process metrics. // CountProcessState creates a scoreboard with the calculated process metrics.
func CalculateProcessScoreboard(p Pool) PoolProcessStateCounter { func CountProcessState(p Pool) PoolProcessStateCounter {
pps := PoolProcessStateCounter{} pps := PoolProcessStateCounter{}
for idx := range p.Processes { for idx := range p.Processes {