Class: OCI::Opsi::Models::MySqlSqlStats

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/opsi/models/my_sql_sql_stats.rb

Overview

MySql Sql Stats type object.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ MySqlSqlStats

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :digest (String)

    The value to assign to the #digest property

  • :time_collected (DateTime)

    The value to assign to the #time_collected property

  • :command_type (String)

    The value to assign to the #command_type property

  • :total_rows (Integer)

    The value to assign to the #total_rows property

  • :perf_schema_used_percent (Integer)

    The value to assign to the #perf_schema_used_percent property

  • :schema_name (String)

    The value to assign to the #schema_name property

  • :exec_count (Integer)

    The value to assign to the #exec_count property

  • :total_latency_in_ps (Integer)

    The value to assign to the #total_latency_in_ps property

  • :lock_latency_in_ps (Integer)

    The value to assign to the #lock_latency_in_ps property

  • :err_count (Integer)

    The value to assign to the #err_count property

  • :warn_count (Integer)

    The value to assign to the #warn_count property

  • :rows_affected (Integer)

    The value to assign to the #rows_affected property

  • :rows_sent (Integer)

    The value to assign to the #rows_sent property

  • :rows_examined (Integer)

    The value to assign to the #rows_examined property

  • :tmp_disk_tables (Integer)

    The value to assign to the #tmp_disk_tables property

  • :tmp_tables (Integer)

    The value to assign to the #tmp_tables property

  • :select_full_join (Integer)

    The value to assign to the #select_full_join property

  • :select_full_range_join (Integer)

    The value to assign to the #select_full_range_join property

  • :select_range (Integer)

    The value to assign to the #select_range property

  • :select_range_check (Integer)

    The value to assign to the #select_range_check property

  • :select_scan (Integer)

    The value to assign to the #select_scan property

  • :sort_merge_passes (Integer)

    The value to assign to the #sort_merge_passes property

  • :sort_range (Integer)

    The value to assign to the #sort_range property

  • :rows_sorted (Integer)

    The value to assign to the #rows_sorted property

  • :sort_scan (Integer)

    The value to assign to the #sort_scan property

  • :no_index_used_count (Integer)

    The value to assign to the #no_index_used_count property

  • :no_good_index_used_count (Integer)

    The value to assign to the #no_good_index_used_count property

  • :cpu_latency_in_ps (Integer)

    The value to assign to the #cpu_latency_in_ps property

  • :max_controlled_memory_in_bytes (Integer)

    The value to assign to the #max_controlled_memory_in_bytes property

  • :max_total_memory_in_bytes (Integer)

    The value to assign to the #max_total_memory_in_bytes property

  • :exec_count_secondary (Integer)

    The value to assign to the #exec_count_secondary property

  • :time_first_seen (DateTime)

    The value to assign to the #time_first_seen property

  • :time_last_seen (DateTime)

    The value to assign to the #time_last_seen property



274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 274

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.digest = attributes[:'digest'] if attributes[:'digest']

  self.time_collected = attributes[:'timeCollected'] if attributes[:'timeCollected']

  raise 'You cannot provide both :timeCollected and :time_collected' if attributes.key?(:'timeCollected') && attributes.key?(:'time_collected')

  self.time_collected = attributes[:'time_collected'] if attributes[:'time_collected']

  self.command_type = attributes[:'commandType'] if attributes[:'commandType']

  raise 'You cannot provide both :commandType and :command_type' if attributes.key?(:'commandType') && attributes.key?(:'command_type')

  self.command_type = attributes[:'command_type'] if attributes[:'command_type']

  self.total_rows = attributes[:'totalRows'] if attributes[:'totalRows']

  raise 'You cannot provide both :totalRows and :total_rows' if attributes.key?(:'totalRows') && attributes.key?(:'total_rows')

  self.total_rows = attributes[:'total_rows'] if attributes[:'total_rows']

  self.perf_schema_used_percent = attributes[:'perfSchemaUsedPercent'] if attributes[:'perfSchemaUsedPercent']

  raise 'You cannot provide both :perfSchemaUsedPercent and :perf_schema_used_percent' if attributes.key?(:'perfSchemaUsedPercent') && attributes.key?(:'perf_schema_used_percent')

  self.perf_schema_used_percent = attributes[:'perf_schema_used_percent'] if attributes[:'perf_schema_used_percent']

  self.schema_name = attributes[:'schemaName'] if attributes[:'schemaName']

  raise 'You cannot provide both :schemaName and :schema_name' if attributes.key?(:'schemaName') && attributes.key?(:'schema_name')

  self.schema_name = attributes[:'schema_name'] if attributes[:'schema_name']

  self.exec_count = attributes[:'execCount'] if attributes[:'execCount']

  raise 'You cannot provide both :execCount and :exec_count' if attributes.key?(:'execCount') && attributes.key?(:'exec_count')

  self.exec_count = attributes[:'exec_count'] if attributes[:'exec_count']

  self.total_latency_in_ps = attributes[:'totalLatencyInPs'] if attributes[:'totalLatencyInPs']

  raise 'You cannot provide both :totalLatencyInPs and :total_latency_in_ps' if attributes.key?(:'totalLatencyInPs') && attributes.key?(:'total_latency_in_ps')

  self.total_latency_in_ps = attributes[:'total_latency_in_ps'] if attributes[:'total_latency_in_ps']

  self.lock_latency_in_ps = attributes[:'lockLatencyInPs'] if attributes[:'lockLatencyInPs']

  raise 'You cannot provide both :lockLatencyInPs and :lock_latency_in_ps' if attributes.key?(:'lockLatencyInPs') && attributes.key?(:'lock_latency_in_ps')

  self.lock_latency_in_ps = attributes[:'lock_latency_in_ps'] if attributes[:'lock_latency_in_ps']

  self.err_count = attributes[:'errCount'] if attributes[:'errCount']

  raise 'You cannot provide both :errCount and :err_count' if attributes.key?(:'errCount') && attributes.key?(:'err_count')

  self.err_count = attributes[:'err_count'] if attributes[:'err_count']

  self.warn_count = attributes[:'warnCount'] if attributes[:'warnCount']

  raise 'You cannot provide both :warnCount and :warn_count' if attributes.key?(:'warnCount') && attributes.key?(:'warn_count')

  self.warn_count = attributes[:'warn_count'] if attributes[:'warn_count']

  self.rows_affected = attributes[:'rowsAffected'] if attributes[:'rowsAffected']

  raise 'You cannot provide both :rowsAffected and :rows_affected' if attributes.key?(:'rowsAffected') && attributes.key?(:'rows_affected')

  self.rows_affected = attributes[:'rows_affected'] if attributes[:'rows_affected']

  self.rows_sent = attributes[:'rowsSent'] if attributes[:'rowsSent']

  raise 'You cannot provide both :rowsSent and :rows_sent' if attributes.key?(:'rowsSent') && attributes.key?(:'rows_sent')

  self.rows_sent = attributes[:'rows_sent'] if attributes[:'rows_sent']

  self.rows_examined = attributes[:'rowsExamined'] if attributes[:'rowsExamined']

  raise 'You cannot provide both :rowsExamined and :rows_examined' if attributes.key?(:'rowsExamined') && attributes.key?(:'rows_examined')

  self.rows_examined = attributes[:'rows_examined'] if attributes[:'rows_examined']

  self.tmp_disk_tables = attributes[:'tmpDiskTables'] if attributes[:'tmpDiskTables']

  raise 'You cannot provide both :tmpDiskTables and :tmp_disk_tables' if attributes.key?(:'tmpDiskTables') && attributes.key?(:'tmp_disk_tables')

  self.tmp_disk_tables = attributes[:'tmp_disk_tables'] if attributes[:'tmp_disk_tables']

  self.tmp_tables = attributes[:'tmpTables'] if attributes[:'tmpTables']

  raise 'You cannot provide both :tmpTables and :tmp_tables' if attributes.key?(:'tmpTables') && attributes.key?(:'tmp_tables')

  self.tmp_tables = attributes[:'tmp_tables'] if attributes[:'tmp_tables']

  self.select_full_join = attributes[:'selectFullJoin'] if attributes[:'selectFullJoin']

  raise 'You cannot provide both :selectFullJoin and :select_full_join' if attributes.key?(:'selectFullJoin') && attributes.key?(:'select_full_join')

  self.select_full_join = attributes[:'select_full_join'] if attributes[:'select_full_join']

  self.select_full_range_join = attributes[:'selectFullRangeJoin'] if attributes[:'selectFullRangeJoin']

  raise 'You cannot provide both :selectFullRangeJoin and :select_full_range_join' if attributes.key?(:'selectFullRangeJoin') && attributes.key?(:'select_full_range_join')

  self.select_full_range_join = attributes[:'select_full_range_join'] if attributes[:'select_full_range_join']

  self.select_range = attributes[:'selectRange'] if attributes[:'selectRange']

  raise 'You cannot provide both :selectRange and :select_range' if attributes.key?(:'selectRange') && attributes.key?(:'select_range')

  self.select_range = attributes[:'select_range'] if attributes[:'select_range']

  self.select_range_check = attributes[:'selectRangeCheck'] if attributes[:'selectRangeCheck']

  raise 'You cannot provide both :selectRangeCheck and :select_range_check' if attributes.key?(:'selectRangeCheck') && attributes.key?(:'select_range_check')

  self.select_range_check = attributes[:'select_range_check'] if attributes[:'select_range_check']

  self.select_scan = attributes[:'selectScan'] if attributes[:'selectScan']

  raise 'You cannot provide both :selectScan and :select_scan' if attributes.key?(:'selectScan') && attributes.key?(:'select_scan')

  self.select_scan = attributes[:'select_scan'] if attributes[:'select_scan']

  self.sort_merge_passes = attributes[:'sortMergePasses'] if attributes[:'sortMergePasses']

  raise 'You cannot provide both :sortMergePasses and :sort_merge_passes' if attributes.key?(:'sortMergePasses') && attributes.key?(:'sort_merge_passes')

  self.sort_merge_passes = attributes[:'sort_merge_passes'] if attributes[:'sort_merge_passes']

  self.sort_range = attributes[:'sortRange'] if attributes[:'sortRange']

  raise 'You cannot provide both :sortRange and :sort_range' if attributes.key?(:'sortRange') && attributes.key?(:'sort_range')

  self.sort_range = attributes[:'sort_range'] if attributes[:'sort_range']

  self.rows_sorted = attributes[:'rowsSorted'] if attributes[:'rowsSorted']

  raise 'You cannot provide both :rowsSorted and :rows_sorted' if attributes.key?(:'rowsSorted') && attributes.key?(:'rows_sorted')

  self.rows_sorted = attributes[:'rows_sorted'] if attributes[:'rows_sorted']

  self.sort_scan = attributes[:'sortScan'] if attributes[:'sortScan']

  raise 'You cannot provide both :sortScan and :sort_scan' if attributes.key?(:'sortScan') && attributes.key?(:'sort_scan')

  self.sort_scan = attributes[:'sort_scan'] if attributes[:'sort_scan']

  self.no_index_used_count = attributes[:'noIndexUsedCount'] if attributes[:'noIndexUsedCount']

  raise 'You cannot provide both :noIndexUsedCount and :no_index_used_count' if attributes.key?(:'noIndexUsedCount') && attributes.key?(:'no_index_used_count')

  self.no_index_used_count = attributes[:'no_index_used_count'] if attributes[:'no_index_used_count']

  self.no_good_index_used_count = attributes[:'noGoodIndexUsedCount'] if attributes[:'noGoodIndexUsedCount']

  raise 'You cannot provide both :noGoodIndexUsedCount and :no_good_index_used_count' if attributes.key?(:'noGoodIndexUsedCount') && attributes.key?(:'no_good_index_used_count')

  self.no_good_index_used_count = attributes[:'no_good_index_used_count'] if attributes[:'no_good_index_used_count']

  self.cpu_latency_in_ps = attributes[:'cpuLatencyInPs'] if attributes[:'cpuLatencyInPs']

  raise 'You cannot provide both :cpuLatencyInPs and :cpu_latency_in_ps' if attributes.key?(:'cpuLatencyInPs') && attributes.key?(:'cpu_latency_in_ps')

  self.cpu_latency_in_ps = attributes[:'cpu_latency_in_ps'] if attributes[:'cpu_latency_in_ps']

  self.max_controlled_memory_in_bytes = attributes[:'maxControlledMemoryInBytes'] if attributes[:'maxControlledMemoryInBytes']

  raise 'You cannot provide both :maxControlledMemoryInBytes and :max_controlled_memory_in_bytes' if attributes.key?(:'maxControlledMemoryInBytes') && attributes.key?(:'max_controlled_memory_in_bytes')

  self.max_controlled_memory_in_bytes = attributes[:'max_controlled_memory_in_bytes'] if attributes[:'max_controlled_memory_in_bytes']

  self.max_total_memory_in_bytes = attributes[:'maxTotalMemoryInBytes'] if attributes[:'maxTotalMemoryInBytes']

  raise 'You cannot provide both :maxTotalMemoryInBytes and :max_total_memory_in_bytes' if attributes.key?(:'maxTotalMemoryInBytes') && attributes.key?(:'max_total_memory_in_bytes')

  self.max_total_memory_in_bytes = attributes[:'max_total_memory_in_bytes'] if attributes[:'max_total_memory_in_bytes']

  self.exec_count_secondary = attributes[:'execCountSecondary'] if attributes[:'execCountSecondary']

  raise 'You cannot provide both :execCountSecondary and :exec_count_secondary' if attributes.key?(:'execCountSecondary') && attributes.key?(:'exec_count_secondary')

  self.exec_count_secondary = attributes[:'exec_count_secondary'] if attributes[:'exec_count_secondary']

  self.time_first_seen = attributes[:'timeFirstSeen'] if attributes[:'timeFirstSeen']

  raise 'You cannot provide both :timeFirstSeen and :time_first_seen' if attributes.key?(:'timeFirstSeen') && attributes.key?(:'time_first_seen')

  self.time_first_seen = attributes[:'time_first_seen'] if attributes[:'time_first_seen']

  self.time_last_seen = attributes[:'timeLastSeen'] if attributes[:'timeLastSeen']

  raise 'You cannot provide both :timeLastSeen and :time_last_seen' if attributes.key?(:'timeLastSeen') && attributes.key?(:'time_last_seen')

  self.time_last_seen = attributes[:'time_last_seen'] if attributes[:'time_last_seen']
end

Instance Attribute Details

#command_typeString

Type of statement such as select, update or delete.

Returns:

  • (String)


25
26
27
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 25

def command_type
  @command_type
end

#cpu_latency_in_psInteger

The total time spent on CPU (in picoseconds) for the current thread.

Returns:

  • (Integer)


127
128
129
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 127

def cpu_latency_in_ps
  @cpu_latency_in_ps
end

#digestString

[Required] Unique SQL ID Digest for a MySql Statement. Example: \"c20fcea11911be36651b7ca7bd3712d4ed9ac1134cee9c6620039e1fb13b5eff\"

Returns:

  • (String)


15
16
17
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 15

def digest
  @digest
end

#err_countInteger

The total number of errors produced by occurrences of the statement.

Returns:

  • (Integer)


55
56
57
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 55

def err_count
  @err_count
end

#exec_countInteger

The total number of times the statement has executed.

Returns:

  • (Integer)


43
44
45
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 43

def exec_count
  @exec_count
end

#exec_count_secondaryInteger

The total number of times a query was processed on the secondary engine (HEATWAVE) for occurrences of this statement Count.

Returns:

  • (Integer)


139
140
141
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 139

def exec_count_secondary
  @exec_count_secondary
end

#lock_latency_in_psInteger

The total time waiting (in picoseconds) for locks by timed occurrences of the statement.

Returns:

  • (Integer)


51
52
53
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 51

def lock_latency_in_ps
  @lock_latency_in_ps
end

#max_controlled_memory_in_bytesInteger

The maximum amount of controlled memory (in bytes) used by the statement.

Returns:

  • (Integer)


131
132
133
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 131

def max_controlled_memory_in_bytes
  @max_controlled_memory_in_bytes
end

#max_total_memory_in_bytesInteger

The maximum amount of memory (in bytes) used by the statement.

Returns:

  • (Integer)


135
136
137
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 135

def max_total_memory_in_bytes
  @max_total_memory_in_bytes
end

#no_good_index_used_countInteger

The number of occurences of the statement where the server found no good index to use Count

Returns:

  • (Integer)


123
124
125
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 123

def no_good_index_used_count
  @no_good_index_used_count
end

#no_index_used_countInteger

The number of occurences of the statement which performed a table scan without using an index Count

Returns:

  • (Integer)


119
120
121
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 119

def no_index_used_count
  @no_index_used_count
end

#perf_schema_used_percentInteger

Percent of SQL statements in the perf schema table relative to max or overflow count set in @@GLOBAL.performance_schema_digests_size.

Returns:

  • (Integer)


33
34
35
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 33

def perf_schema_used_percent
  @perf_schema_used_percent
end

#rows_affectedInteger

The total number of rows affected by occurrences of the statement.

Returns:

  • (Integer)


63
64
65
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 63

def rows_affected
  @rows_affected
end

#rows_examinedInteger

The total number of rows read from storage engines by occurrences of the statement.

Returns:

  • (Integer)


71
72
73
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 71

def rows_examined
  @rows_examined
end

#rows_sentInteger

The total number of rows returned by occurrences of the statement.

Returns:

  • (Integer)


67
68
69
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 67

def rows_sent
  @rows_sent
end

#rows_sortedInteger

The total number of rows sorted by occurrences of the statement.

Returns:

  • (Integer)


111
112
113
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 111

def rows_sorted
  @rows_sorted
end

#schema_nameString

Name of Database Schema. Example: \"performance_schema\"

Returns:

  • (String)


39
40
41
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 39

def schema_name
  @schema_name
end

#select_full_joinInteger

The total number of joins that perform table scans because they do not use indexes by occurrences of the statement. If this value is not 0

Returns:

  • (Integer)


83
84
85
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 83

def select_full_join
  @select_full_join
end

#select_full_range_joinInteger

The total number of joins that used a range search on a reference table by occurrences of the statement

Returns:

  • (Integer)


87
88
89
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 87

def select_full_range_join
  @select_full_range_join
end

#select_rangeInteger

The total number of joins that used ranges on the first table by occurrences of the statement. This is normally not a critical issue even if the value is quite large. Count

Returns:

  • (Integer)


91
92
93
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 91

def select_range
  @select_range
end

#select_range_checkInteger

The total number of joins without keys that check for key usage after each row by occurrences of the statement. If this is not 0

Returns:

  • (Integer)


95
96
97
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 95

def select_range_check
  @select_range_check
end

#select_scanInteger

The total number of joins that did a full scan of the first table by occurrences of the statement Count

Returns:

  • (Integer)


99
100
101
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 99

def select_scan
  @select_scan
end

#sort_merge_passesInteger

The total number of sort merge passes by occurrences of the statement.

Returns:

  • (Integer)


103
104
105
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 103

def sort_merge_passes
  @sort_merge_passes
end

#sort_rangeInteger

The total number of sorts that were done using ranges by occurrences of the statement.

Returns:

  • (Integer)


107
108
109
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 107

def sort_range
  @sort_range
end

#sort_scanInteger

The total number of sorts that were done by scanning the table by occurrences of the statement.

Returns:

  • (Integer)


115
116
117
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 115

def sort_scan
  @sort_scan
end

#time_collectedDateTime

[Required] Collection timestamp. Example: \"2020-03-31T00:00:00.000Z\"

Returns:

  • (DateTime)


21
22
23
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 21

def time_collected
  @time_collected
end

#time_first_seenDateTime

The time at which statement was first seen. Example: \"2023-01-16 08:04:31.533577\"

Returns:

  • (DateTime)


145
146
147
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 145

def time_first_seen
  @time_first_seen
end

#time_last_seenDateTime

The time at which statement was most recently seen for all occurrences of the statement. Example: \"2023-01-30 02:17:08.067961\"

Returns:

  • (DateTime)


151
152
153
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 151

def time_last_seen
  @time_last_seen
end

#tmp_disk_tablesInteger

The total number of internal on-disk temporary tables created by occurrences of the statement.

Returns:

  • (Integer)


75
76
77
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 75

def tmp_disk_tables
  @tmp_disk_tables
end

#tmp_tablesInteger

The total number of internal in-memory temporary tables created by occurrences of the statement Count

Returns:

  • (Integer)


79
80
81
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 79

def tmp_tables
  @tmp_tables
end

#total_latency_in_psInteger

The total wait time (in picoseconds) of timed occurrences of the statement.

Returns:

  • (Integer)


47
48
49
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 47

def total_latency_in_ps
  @total_latency_in_ps
end

#total_rowsInteger

Total number of SQL statements used in collection ranking calculation.

Returns:

  • (Integer)


29
30
31
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 29

def total_rows
  @total_rows
end

#warn_countInteger

The total number of warnings produced by occurrences of the statement.

Returns:

  • (Integer)


59
60
61
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 59

def warn_count
  @warn_count
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 154

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'digest': :'digest',
    'time_collected': :'timeCollected',
    'command_type': :'commandType',
    'total_rows': :'totalRows',
    'perf_schema_used_percent': :'perfSchemaUsedPercent',
    'schema_name': :'schemaName',
    'exec_count': :'execCount',
    'total_latency_in_ps': :'totalLatencyInPs',
    'lock_latency_in_ps': :'lockLatencyInPs',
    'err_count': :'errCount',
    'warn_count': :'warnCount',
    'rows_affected': :'rowsAffected',
    'rows_sent': :'rowsSent',
    'rows_examined': :'rowsExamined',
    'tmp_disk_tables': :'tmpDiskTables',
    'tmp_tables': :'tmpTables',
    'select_full_join': :'selectFullJoin',
    'select_full_range_join': :'selectFullRangeJoin',
    'select_range': :'selectRange',
    'select_range_check': :'selectRangeCheck',
    'select_scan': :'selectScan',
    'sort_merge_passes': :'sortMergePasses',
    'sort_range': :'sortRange',
    'rows_sorted': :'rowsSorted',
    'sort_scan': :'sortScan',
    'no_index_used_count': :'noIndexUsedCount',
    'no_good_index_used_count': :'noGoodIndexUsedCount',
    'cpu_latency_in_ps': :'cpuLatencyInPs',
    'max_controlled_memory_in_bytes': :'maxControlledMemoryInBytes',
    'max_total_memory_in_bytes': :'maxTotalMemoryInBytes',
    'exec_count_secondary': :'execCountSecondary',
    'time_first_seen': :'timeFirstSeen',
    'time_last_seen': :'timeLastSeen'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 195

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'digest': :'String',
    'time_collected': :'DateTime',
    'command_type': :'String',
    'total_rows': :'Integer',
    'perf_schema_used_percent': :'Integer',
    'schema_name': :'String',
    'exec_count': :'Integer',
    'total_latency_in_ps': :'Integer',
    'lock_latency_in_ps': :'Integer',
    'err_count': :'Integer',
    'warn_count': :'Integer',
    'rows_affected': :'Integer',
    'rows_sent': :'Integer',
    'rows_examined': :'Integer',
    'tmp_disk_tables': :'Integer',
    'tmp_tables': :'Integer',
    'select_full_join': :'Integer',
    'select_full_range_join': :'Integer',
    'select_range': :'Integer',
    'select_range_check': :'Integer',
    'select_scan': :'Integer',
    'sort_merge_passes': :'Integer',
    'sort_range': :'Integer',
    'rows_sorted': :'Integer',
    'sort_scan': :'Integer',
    'no_index_used_count': :'Integer',
    'no_good_index_used_count': :'Integer',
    'cpu_latency_in_ps': :'Integer',
    'max_controlled_memory_in_bytes': :'Integer',
    'max_total_memory_in_bytes': :'Integer',
    'exec_count_secondary': :'Integer',
    'time_first_seen': :'DateTime',
    'time_last_seen': :'DateTime'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 482

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    digest == other.digest &&
    time_collected == other.time_collected &&
    command_type == other.command_type &&
    total_rows == other.total_rows &&
    perf_schema_used_percent == other.perf_schema_used_percent &&
    schema_name == other.schema_name &&
    exec_count == other.exec_count &&
    total_latency_in_ps == other.total_latency_in_ps &&
    lock_latency_in_ps == other.lock_latency_in_ps &&
    err_count == other.err_count &&
    warn_count == other.warn_count &&
    rows_affected == other.rows_affected &&
    rows_sent == other.rows_sent &&
    rows_examined == other.rows_examined &&
    tmp_disk_tables == other.tmp_disk_tables &&
    tmp_tables == other.tmp_tables &&
    select_full_join == other.select_full_join &&
    select_full_range_join == other.select_full_range_join &&
    select_range == other.select_range &&
    select_range_check == other.select_range_check &&
    select_scan == other.select_scan &&
    sort_merge_passes == other.sort_merge_passes &&
    sort_range == other.sort_range &&
    rows_sorted == other.rows_sorted &&
    sort_scan == other.sort_scan &&
    no_index_used_count == other.no_index_used_count &&
    no_good_index_used_count == other.no_good_index_used_count &&
    cpu_latency_in_ps == other.cpu_latency_in_ps &&
    max_controlled_memory_in_bytes == other.max_controlled_memory_in_bytes &&
    max_total_memory_in_bytes == other.max_total_memory_in_bytes &&
    exec_count_secondary == other.exec_count_secondary &&
    time_first_seen == other.time_first_seen &&
    time_last_seen == other.time_last_seen
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 544

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


524
525
526
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 524

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



533
534
535
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 533

def hash
  [digest, time_collected, command_type, total_rows, perf_schema_used_percent, schema_name, exec_count, total_latency_in_ps, lock_latency_in_ps, err_count, warn_count, rows_affected, rows_sent, rows_examined, tmp_disk_tables, tmp_tables, select_full_join, select_full_range_join, select_range, select_range_check, select_scan, sort_merge_passes, sort_range, rows_sorted, sort_scan, no_index_used_count, no_good_index_used_count, cpu_latency_in_ps, max_controlled_memory_in_bytes, max_total_memory_in_bytes, exec_count_secondary, time_first_seen, time_last_seen].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



577
578
579
580
581
582
583
584
585
586
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 577

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



571
572
573
# File 'lib/oci/opsi/models/my_sql_sql_stats.rb', line 571

def to_s
  to_hash.to_s
end