Class: Google::Apis::DatabasecenterV1beta::QueryStats

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/databasecenter_v1beta/classes.rb,
lib/google/apis/databasecenter_v1beta/representations.rb,
lib/google/apis/databasecenter_v1beta/representations.rb

Overview

QueryStats contains the stats for a particular combination of query_hash, query_string and resource_type.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QueryStats

Returns a new instance of QueryStats.



1838
1839
1840
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1838

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#inefficient_query_infoGoogle::Apis::DatabasecenterV1beta::InefficientQueryInfo

Metadata about inefficient query signal info for a database resource. Corresponds to the JSON property inefficientQueryInfo



1810
1811
1812
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1810

def inefficient_query_info
  @inefficient_query_info
end

#normalized_queryString

The query string is normalized query without any PII data. Corresponds to the JSON property normalizedQuery

Returns:

  • (String)


1815
1816
1817
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1815

def normalized_query
  @normalized_query
end

#query_hashString

The query hash of the query. Corresponds to the JSON property queryHash

Returns:

  • (String)


1820
1821
1822
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1820

def query_hash
  @query_hash
end

#query_metricsGoogle::Apis::DatabasecenterV1beta::QueryMetrics

QueryMetrics contains the metrics related to the query execution. Corresponds to the JSON property queryMetrics



1825
1826
1827
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1825

def query_metrics
  @query_metrics
end

#resource_idsArray<Google::Apis::DatabasecenterV1beta::ResourceId>

The resource ids for which the query stats are collected. Corresponds to the JSON property resourceIds



1830
1831
1832
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1830

def resource_ids
  @resource_ids
end

#resource_typeString

The type of the resource. sqladmin.googleapis.com/Instance alloydb.googleapis. com/Cluster alloydb.googleapis.com/Instance Corresponds to the JSON property resourceType

Returns:

  • (String)


1836
1837
1838
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1836

def resource_type
  @resource_type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1843
1844
1845
1846
1847
1848
1849
1850
# File 'lib/google/apis/databasecenter_v1beta/classes.rb', line 1843

def update!(**args)
  @inefficient_query_info = args[:inefficient_query_info] if args.key?(:inefficient_query_info)
  @normalized_query = args[:normalized_query] if args.key?(:normalized_query)
  @query_hash = args[:query_hash] if args.key?(:query_hash)
  @query_metrics = args[:query_metrics] if args.key?(:query_metrics)
  @resource_ids = args[:resource_ids] if args.key?(:resource_ids)
  @resource_type = args[:resource_type] if args.key?(:resource_type)
end