Skip to content

Commit

Permalink
Remove underscores
Browse files Browse the repository at this point in the history
  • Loading branch information
CHERTS committed Nov 26, 2024
1 parent a001d61 commit fc1cb8f
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions internal/collector/postgres_conflicts.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,21 @@ func (c *postgresConflictsCollector) Update(config Config, ch chan<- prometheus.
ch <- c.conflicts.newConstMetric(stat.snapshot, stat.database, "snapshot")
ch <- c.conflicts.newConstMetric(stat.bufferpin, stat.database, "bufferpin")
ch <- c.conflicts.newConstMetric(stat.deadlock, stat.database, "deadlock")
ch <- c.conflicts.newConstMetric(stat.active_logicalslot, stat.database, "active_logicalslot")
ch <- c.conflicts.newConstMetric(stat.activeLogicalslot, stat.database, "active_logicalslot")
}

return nil
}

// postgresConflictStat represents per-database recovery conflicts stats based on pg_stat_database_conflicts.
type postgresConflictStat struct {
database string
tablespace float64
lock float64
snapshot float64
bufferpin float64
deadlock float64
active_logicalslot float64
database string
tablespace float64
lock float64
snapshot float64
bufferpin float64
deadlock float64
activeLogicalslot float64
}

// parsePostgresDatabasesStats parses PGResult, extract data and return struct with stats values.
Expand Down Expand Up @@ -131,7 +131,7 @@ func parsePostgresConflictStats(r *model.PGResult, labelNames []string) map[stri
case "confl_deadlock":
s.deadlock = v
case "confl_active_logicalslot":
s.active_logicalslot = v
s.activeLogicalslot = v
default:
continue
}
Expand Down

0 comments on commit fc1cb8f

Please sign in to comment.