Class: SqlGenius::Core::Analysis::ServerOverview
- Inherits:
-
Object
- Object
- SqlGenius::Core::Analysis::ServerOverview
- Defined in:
- lib/sql_genius/core/analysis/server_overview.rb
Overview
Dashboard snapshot of server state. Dispatches to a dialect-specific implementation that produces a uniform nested hash with four top-level sections: server, connections, innodb, queries.
On PostgreSQL the ‘innodb` section is populated with the closest equivalents (shared_buffers as buffer pool size, blks_hit/blks_read ratio as buffer pool hit rate). Lock-related fields fall back to 0 since there is no direct equivalent of InnoDB row lock waits.
Defined Under Namespace
Classes: Mysql, Postgresql
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(connection) ⇒ ServerOverview
constructor
A new instance of ServerOverview.
Constructor Details
#initialize(connection) ⇒ ServerOverview
Returns a new instance of ServerOverview.
15 16 17 |
# File 'lib/sql_genius/core/analysis/server_overview.rb', line 15 def initialize(connection) @connection = connection end |
Instance Method Details
#call ⇒ Object
19 20 21 |
# File 'lib/sql_genius/core/analysis/server_overview.rb', line 19 def call impl_for(@connection).call end |