Class: Mxrb::Oql::SqlServerWorkloadAnalyzer
- Inherits:
-
Object
- Object
- Mxrb::Oql::SqlServerWorkloadAnalyzer
- Defined in:
- lib/mxrb/oql/sql_server_workload_analyzer.rb
Overview
Normalizes read-only SQL Server DMV snapshots into the shared workload report.
Instance Method Summary collapse
Instance Method Details
#analyze(query_rows:, table_rows:, index_rows:) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/mxrb/oql/sql_server_workload_analyzer.rb', line 12 def analyze(query_rows:, table_rows:, index_rows:) queries = query_rows.map { query_entry(_1) }.freeze findings = [ *queries.filter_map { query_finding(_1) }, *table_rows.filter_map { table_finding(_1) }, *index_rows.filter_map { index_finding(_1) } ].freeze WorkloadReport.new(:sql_server, queries, table_rows.freeze, index_rows.freeze, findings) end |