Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mysql] rewrite tests #1471

Merged
merged 2 commits into from
Apr 8, 2015
Merged

[mysql] rewrite tests #1471

merged 2 commits into from
Apr 8, 2015

Conversation

yannmh
Copy link
Member

@yannmh yannmh commented Mar 25, 2015

No description provided.

@yannmh yannmh self-assigned this Mar 25, 2015
@yannmh yannmh added this to the 5.3.0 milestone Mar 25, 2015
@yannmh yannmh added the checks label Mar 25, 2015
# Available on Linux
SYSTEM_METRICS = [
"mysql.performance.user_time",
"mysql.performance.kernel_time"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultra nitpick: but please use single quotes everywhere. Or or the opposite if you prefer to...

@yannmh yannmh force-pushed the yann/mysql-tests-review branch 2 times, most recently from 74a9850 to 009adbd Compare March 26, 2015 16:20

# Test optional metrics
# Gauges - at least 1 match
self._test_optional_metrics(self.COMMON_GAUGES, match_rate=50)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure why we want this here? Why don't you use at_least=1?

@yannmh yannmh force-pushed the yann/mysql-tests-review branch from 009adbd to cd04a2c Compare March 30, 2015 18:14
@LeoCavaille
Copy link
Member

We talked about it, will stay in standby until we figure out what metrics we can pull out reliably fro MySQL in the test.

@yannmh yannmh force-pushed the yann/mysql-tests-review branch from 3bd2668 to 7d247b7 Compare April 2, 2015 17:09
@yannmh
Copy link
Member Author

yannmh commented Apr 2, 2015

Small update.
MySQL check integration test is not able to fetch these metrics:

                                    # Corresponding Status
'mysql.innodb.buffer_pool_size',    # Innodb_buffer_pool_size
'mysql.innodb.current_row_locks',   # Innodb_current_row_locks
'mysql.innodb.mutex_spin_waits',    # Innodb_mutex_spin_waits
'mysql.innodb.mutex_spin_rounds',   # Innodb_mutex_spin_rounds
'mysql.innodb.mutex_os_waits',      # Innodb_mutex_os_waits

Innodb_buffer_pool_size is not a server status. I think it was introduced by mistake: 8adccfd.

Other missing statuses are proper to MariaDB:
https://dev.mysql.com/doc/refman/5.0/en/server-status-variables.html
vs
https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-status-variables/

I ran some tests to confirm it.

mysql> show global status like 'Innodb_%';
+---------------------------------------+-------------+
| Variable_name                         | Value       |
+---------------------------------------+-------------+
| Innodb_buffer_pool_dump_status        | not started |
| Innodb_buffer_pool_load_status        | not started |
| Innodb_buffer_pool_pages_data         | 148         |
| Innodb_buffer_pool_bytes_data         | 2424832     |
| Innodb_buffer_pool_pages_dirty        | 0           |
| Innodb_buffer_pool_bytes_dirty        | 0           |
| Innodb_buffer_pool_pages_flushed      | 1           |
| Innodb_buffer_pool_pages_free         | 130916      |
| Innodb_buffer_pool_pages_misc         | 0           |
| Innodb_buffer_pool_pages_total        | 131064      |
| Innodb_buffer_pool_read_ahead_rnd     | 0           |
| Innodb_buffer_pool_read_ahead         | 0           |
| Innodb_buffer_pool_read_ahead_evicted | 0           |
| Innodb_buffer_pool_read_requests      | 511         |
| Innodb_buffer_pool_reads              | 149         |
| Innodb_buffer_pool_wait_free          | 0           |
| Innodb_buffer_pool_write_requests     | 1           |
| Innodb_data_fsyncs                    | 5           |
| Innodb_data_pending_fsyncs            | 0           |
| Innodb_data_pending_reads             | 0           |
| Innodb_data_pending_writes            | 0           |
| Innodb_data_read                      | 2510848     |
| Innodb_data_reads                     | 159         |
| Innodb_data_writes                    | 5           |
| Innodb_data_written                   | 34304       |
| Innodb_dblwr_pages_written            | 1           |
| Innodb_dblwr_writes                   | 1           |
| Innodb_have_atomic_builtins           | ON          |
| Innodb_log_waits                      | 0           |
| Innodb_log_write_requests             | 0           |
| Innodb_log_writes                     | 1           |
| Innodb_os_log_fsyncs                  | 3           |
| Innodb_os_log_pending_fsyncs          | 0           |
| Innodb_os_log_pending_writes          | 0           |
| Innodb_os_log_written                 | 512         |
| Innodb_page_size                      | 16384       |
| Innodb_pages_created                  | 0           |
| Innodb_pages_read                     | 148         |
| Innodb_pages_written                  | 1           |
| Innodb_row_lock_current_waits         | 0           |
| Innodb_row_lock_time                  | 0           |
| Innodb_row_lock_time_avg              | 0           |
| Innodb_row_lock_time_max              | 0           |
| Innodb_row_lock_waits                 | 0           |
| Innodb_rows_deleted                   | 0           |
| Innodb_rows_inserted                  | 0           |
| Innodb_rows_read                      | 0           |
| Innodb_rows_updated                   | 0           |
| Innodb_num_open_files                 | 3           |
| Innodb_truncated_status_writes        | 0           |
| Innodb_available_undo_logs            | 128         |
+---------------------------------------+-------------+
51 rows in set (0.00 sec)
MariaDB [(none)]> SHOW /*!50002 GLOBAL */ STATUS like 'Innodb%';
+-----------------------------------------+-------------+
| Variable_name                           | Value       |
+-----------------------------------------+-------------+
| Innodb_available_undo_logs              | 128         |
| Innodb_background_log_sync              | 245         |
| Innodb_buffer_pool_bytes_data           | 2523136     |
| Innodb_buffer_pool_bytes_dirty          | 0           |
| Innodb_buffer_pool_dump_status          | not started |
| Innodb_buffer_pool_load_status          | not started |
| Innodb_buffer_pool_pages_data           | 154         |
| Innodb_buffer_pool_pages_dirty          | 0           |
| Innodb_buffer_pool_pages_flushed        | 1           |
| Innodb_buffer_pool_pages_free           | 16229       |
| Innodb_buffer_pool_pages_lru_flushed    | 0           |
| Innodb_buffer_pool_pages_made_not_young | 0           |
| Innodb_buffer_pool_pages_made_young     | 0           |
| Innodb_buffer_pool_pages_misc           | 0           |
| Innodb_buffer_pool_pages_old            | 0           |
| Innodb_buffer_pool_pages_total          | 16383       |
| Innodb_buffer_pool_read_ahead           | 0           |
| Innodb_buffer_pool_read_ahead_evicted   | 0           |
| Innodb_buffer_pool_read_ahead_rnd       | 0           |
| Innodb_buffer_pool_read_requests        | 558         |
| Innodb_buffer_pool_reads                | 155         |
| Innodb_buffer_pool_wait_free            | 0           |
| Innodb_buffer_pool_write_requests       | 1           |
| Innodb_checkpoint_age                   | 0           |
| Innodb_checkpoint_max_age               | 80826164    |
| Innodb_data_fsyncs                      | 5           |
| Innodb_data_pending_fsyncs              | 0           |
| Innodb_data_pending_reads               | 0           |
| Innodb_data_pending_writes              | 0           |
| Innodb_data_read                        | 2609152     |
| Innodb_data_reads                       | 168         |
| Innodb_data_writes                      | 5           |
| Innodb_data_written                     | 34304       |
| Innodb_dblwr_pages_written              | 1           |
| Innodb_dblwr_writes                     | 1           |
| Innodb_deadlocks                        | 0           |
| Innodb_have_atomic_builtins             | ON          |
| Innodb_history_list_length              | 0           |
| Innodb_ibuf_discarded_delete_marks      | 0           |
| Innodb_ibuf_discarded_deletes           | 0           |
| Innodb_ibuf_discarded_inserts           | 0           |
| Innodb_ibuf_free_list                   | 0           |
| Innodb_ibuf_merged_delete_marks         | 0           |
| Innodb_ibuf_merged_deletes              | 0           |
| Innodb_ibuf_merged_inserts              | 0           |
| Innodb_ibuf_merges                      | 0           |
| Innodb_ibuf_segment_size                | 2           |
| Innodb_ibuf_size                        | 1           |
| Innodb_log_waits                        | 0           |
| Innodb_log_write_requests               | 0           |
| Innodb_log_writes                       | 1           |
| Innodb_lsn_current                      | 1616717     |
| Innodb_lsn_flushed                      | 1616717     |
| Innodb_lsn_last_checkpoint              | 1616717     |
| Innodb_master_thread_active_loops       | 1           |
| Innodb_master_thread_idle_loops         | 244         |
| Innodb_max_trx_id                       | 1796        |
| Innodb_mem_adaptive_hash                | 4430032     |
| Innodb_mem_dictionary                   | 1162431     |
| Innodb_mem_total                        | 274726912   |
| Innodb_mutex_os_waits                   | 1           |
| Innodb_mutex_spin_rounds                | 37          |
| Innodb_mutex_spin_waits                 | 8           |
| Innodb_oldest_view_low_limit_trx_id     | 0           |
| Innodb_os_log_fsyncs                    | 3           |
| Innodb_os_log_pending_fsyncs            | 0           |
| Innodb_os_log_pending_writes            | 0           |
| Innodb_os_log_written                   | 512         |
| Innodb_page_size                        | 16384       |
| Innodb_pages_created                    | 0           |
| Innodb_pages_read                       | 154         |
| Innodb_pages_written                    | 1           |
| Innodb_purge_trx_id                     | 0           |
| Innodb_purge_undo_no                    | 0           |
| Innodb_read_views_memory                | 88          |
| Innodb_row_lock_current_waits           | 0           |
| Innodb_row_lock_time                    | 0           |
| Innodb_row_lock_time_avg                | 0           |
| Innodb_row_lock_time_max                | 0           |
| Innodb_row_lock_waits                   | 0           |
| Innodb_rows_deleted                     | 0           |
| Innodb_rows_inserted                    | 0           |
| Innodb_rows_read                        | 0           |
| Innodb_rows_updated                     | 0           |
| Innodb_system_rows_deleted              | 0           |
| Innodb_system_rows_inserted             | 0           |
| Innodb_system_rows_read                 | 0           |
| Innodb_system_rows_updated              | 0           |
| Innodb_s_lock_os_waits                  | 2           |
| Innodb_s_lock_spin_rounds               | 60          |
| Innodb_s_lock_spin_waits                | 2           |
| Innodb_truncated_status_writes          | 0           |
| Innodb_x_lock_os_waits                  | 0           |
| Innodb_x_lock_spin_rounds               | 0           |
| Innodb_x_lock_spin_waits                | 0           |
+-----------------------------------------+-------------+
95 rows in set (0.00 sec)

@LeoCavaille
Copy link
Member

Innodb_buffer_pool_size is apparently a config variable, I can get it by doing SHOW VARIABLES. So I guess it should just be removed from the list then?
Also @yannmh can you rebase this ?

@yannmh
Copy link
Member Author

yannmh commented Apr 7, 2015

Yes, I'd remove it too as we were already covering this metric with mysql.innodb.buffer_pool_total (Innodb_buffer_pool_pages_total x Innodb_page_size).

@yannmh yannmh force-pushed the yann/mysql-tests-review branch from 7d247b7 to c8b94f1 Compare April 7, 2015 20:57
@yannmh yannmh force-pushed the yann/mysql-tests-review branch from c8b94f1 to 2ab2440 Compare April 7, 2015 22:56
@LeoCavaille
Copy link
Member

Sweet 🍰, merging 👍

LeoCavaille added a commit that referenced this pull request Apr 8, 2015
@LeoCavaille LeoCavaille merged commit 9a4f66d into master Apr 8, 2015
@LeoCavaille LeoCavaille deleted the yann/mysql-tests-review branch April 8, 2015 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants