From 3ada457d13a783696c54d99ce442339bc86dadce Mon Sep 17 00:00:00 2001 From: Enrico Stahn Date: Tue, 27 Feb 2018 19:35:45 +1100 Subject: [PATCH] Rename CalculateProcessScoreboard to CountProcessState --- phpfpm/exporter.go | 2 +- phpfpm/phpfpm.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpfpm/exporter.go b/phpfpm/exporter.go index e240f58..c4476ee 100644 --- a/phpfpm/exporter.go +++ b/phpfpm/exporter.go @@ -178,7 +178,7 @@ func (e *Exporter) Collect(ch chan<- prometheus.Metric) { continue } - pps := CalculateProcessScoreboard(pool) + pps := CountProcessState(pool) 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.") } diff --git a/phpfpm/phpfpm.go b/phpfpm/phpfpm.go index 9d865e3..09a099f 100644 --- a/phpfpm/phpfpm.go +++ b/phpfpm/phpfpm.go @@ -202,8 +202,8 @@ func (pps *PoolProcessStateCounter) Total() int64 { return pps.Idle + pps.Active() } -// CalculateProcessScoreboard creates a scoreboard with the calculated process metrics. -func CalculateProcessScoreboard(p Pool) PoolProcessStateCounter { +// CountProcessState creates a scoreboard with the calculated process metrics. +func CountProcessState(p Pool) PoolProcessStateCounter { pps := PoolProcessStateCounter{} for idx := range p.Processes {