class GitLab::Exporter::Database::TupleStatsCollector

A helper class to collect tuple stats from the database

It takes a connection string (e.g. “dbname=test port=5432”)

Constants

COLUMNS
QUERY

Public Instance Methods

run() click to toggle source
# File lib/gitlab_exporter/database/tuple_stats.rb, line 17
def run
  with_connection_pool do |conn|
    conn.exec(QUERY).each.with_object({}) do |row, stats|
      stats[row.delete("relname")] = row
    end
  end
end