Rename CalculateProcessScoreboard to CountProcessState
This commit is contained in:
parent
1066444ca1
commit
3ada457d13
2 changed files with 3 additions and 3 deletions
|
@ -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.")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue