Commit d69803d
committed
BUG#35217728 Speedup mtr.pl by clean vardir
When using mtr.pl for development (running individual tests or parts of suites) the time spent setting up the environment far exceeds the time to run the actual test. Most timeconsuming are the steps to create the MySQL system database (i.e running mysqld --initialize) and copying the std_data directory into the var directory. Since the size of std_data grows over time as more and more stuff are added there, this step takes increasingly longer. Fix by improving the --fast mode to clean the var directory for reuse rather than removing it entirely and creating it again. This allows the data/ and std_data/ directories to be kept. Also make it possible to pass --no-fast to negate any previous --fast arguments one the command line. With this patch, the time to run a single simple test is decreased with 13 seconds on standard development machine. $ mtr alias <snip> Checking leftover processes Removing old var directory Creating var directory '/home/mblaudd/mysql/trunk/bld/mysql-test/var' - symlinking 'var' to '/dev/shm/var_auto_iXMr' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) ------------------------------------------------------------------------------ [ 50%] main.alias [ pass ] 758 [100%] shutdown_report [ pass ] ------------------------------------------------------------------------------ The servers were restarted 0 times The servers were reinitialized 0 times Spent 0.758 of 17 seconds executing testcases $ mtr alias --fast <snip> Checking leftover processes Cleaning var directory to save time Creating var directory '/home/mblaudd/mysql/trunk/bld/mysql-test/var' Reusing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ [ 50%] main.alias [ pass ] 696 [100%] shutdown_report [ pass ] ------------------------------------------------------------------------------ The servers were restarted 0 times The servers were reinitialized 0 times Spent 0.696 of 4 seconds executing testcases Change-Id: Ibcf82874f61bbf1e1c8746da028045ccbc0a8a501 parent c05a5a0 commit d69803d
1 file changed
+43
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1758 | 1758 | | |
1759 | 1759 | | |
1760 | 1760 | | |
1761 | | - | |
| 1761 | + | |
1762 | 1762 | | |
1763 | 1763 | | |
1764 | 1764 | | |
| |||
2084 | 2084 | | |
2085 | 2085 | | |
2086 | 2086 | | |
| 2087 | + | |
2087 | 2088 | | |
2088 | 2089 | | |
2089 | 2090 | | |
| |||
3407 | 3408 | | |
3408 | 3409 | | |
3409 | 3410 | | |
| 3411 | + | |
| 3412 | + | |
| 3413 | + | |
| 3414 | + | |
| 3415 | + | |
| 3416 | + | |
| 3417 | + | |
| 3418 | + | |
| 3419 | + | |
| 3420 | + | |
| 3421 | + | |
| 3422 | + | |
| 3423 | + | |
| 3424 | + | |
| 3425 | + | |
| 3426 | + | |
| 3427 | + | |
| 3428 | + | |
| 3429 | + | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
| 3438 | + | |
3410 | 3439 | | |
3411 | 3440 | | |
3412 | 3441 | | |
| |||
3517 | 3546 | | |
3518 | 3547 | | |
3519 | 3548 | | |
3520 | | - | |
| 3549 | + | |
| 3550 | + | |
3521 | 3551 | | |
3522 | 3552 | | |
3523 | 3553 | | |
| |||
4155 | 4185 | | |
4156 | 4186 | | |
4157 | 4187 | | |
4158 | | - | |
4159 | | - | |
4160 | 4188 | | |
4161 | 4189 | | |
4162 | 4190 | | |
| |||
4213 | 4241 | | |
4214 | 4242 | | |
4215 | 4243 | | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
4216 | 4252 | | |
4217 | 4253 | | |
4218 | 4254 | | |
| |||
7975 | 8011 | | |
7976 | 8012 | | |
7977 | 8013 | | |
7978 | | - | |
7979 | | - | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
7980 | 8017 | | |
7981 | 8018 | | |
7982 | 8019 | | |
| |||
0 commit comments