mariadb/mysql-test/suite/perfschema_stress
Monty c9f612dbde Add more execution stages (commit, rollback, etc)
This was done to get more information about where time is spent.
Now we can get proper timing for time spent in commit, rollback,
binlog write etc.

Following stages was added:
- Commit
- Commit_implicit
- Rollback
- Rollback implicit
- Binlog write
- Init for update
  - This is used instead of "Init" for insert, update and delete.
- Staring cleanup

Following stages where changed:
- "Unlocking tables" stage reset stage to previous stage at end
- "binlog write" stage resets stage to previous stage at end
- "end" -> "end of update loop"
- "cleaning up" -> "Reset for next command"
- Added stage_searching_rows_for_update when searching for rows
  to be deleted.

Other things:
- Renamed all stages to start with big letter (before there was no
  consitency)
- Increased performance_schema_max_stage_classes from 150 to 160.
- Most of the test changes in performance schema comes from renaming of
  stages.
- Removed duplicate output of variables and inital state in a lot of
  performance schema tests.
  This was done to make it easier to change a default value for a
  performance variable without affecting all tests.
- Added start_server_variables.test to check configuration
- Removed some duplicate "closing tables" stages
- Updated position for "stage_init_update" and "stage_updating" for
  delete, insert and update to be just before update loop (for more
  exact timing).
- Don't set "Checking permissions" twice in a row.
- Remove stage_end stage from creating views (not done for create table
  either).
- Updated default performance history size from 10 to 20 because of new
  stages
- Ensure that ps_enabled is correct (to be used in a later patch)
2017-11-05 22:23:31 +02:00
..
include Removing copyright headers from test files 2011-10-19 23:44:17 +02:00
r merge with 5.3 2011-10-19 21:45:18 +02:00
t Add more execution stages (commit, rollback, etc) 2017-11-05 22:23:31 +02:00
README Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
stress_init.txt WL#2360 Performance schema 2010-01-11 18:47:27 -07:00
stress_tests.txt WL#2360 Performance schema 2010-01-11 18:47:27 -07:00

# Copyright (c) 2009, 2010 Sun Microsystems, Inc.
# Use is subject to license terms
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA

WL#4818 - Stress testing of PERFORMANCE_SCHEMA

The performance schema storage engine is backed by data structures, we
want to be sure that these data structures are not fragile under
load.

NFS1: 20 threads doing read of performance data (both mutex and
disk), 5 threads changing what is being instrumented, 25 threads doing
DML and DDL so that the statistics are updated. Connections should frequently
disconnect or be KILLed, and reconnect.

The database should not crash under any circumstance.

How to run:

MTR_VERSION=1 ./mtr --stress \
                    --stress-suite=perfschema_stress \
                    --stress-threads=50 \
                    --stress-test-duration=3600