226 Commits

Author SHA1 Message Date
0adddc2b83 Merge branch '1.0' 2017-03-29 21:07:40 +03:00
a0658f09ce Memory benchmark optimizations.
Optimize the memory benchmark:
- get rid of the global mutex to calculate statistics
- remove if() and switch() branches on critical code paths
- align memory blocks to OS page size
- use native machine word size instead of 'int'
2017-03-29 21:02:07 +03:00
f4278f38fa Merge branch '1.0' 2017-03-29 16:44:07 +03:00
d514625849 Override the default time limit in test_memory.t to improve stability. 2017-03-29 16:43:35 +03:00
0245b32375 Fix opt_luajit_cmd.t. 2017-03-29 08:00:53 +03:00
b33e546fcf Add --luajit-cmd option which is equivalent to 'luajit -j'. 2017-03-29 00:21:45 +03:00
ce7770c626 Merge branch '1.0' 2017-03-12 10:46:59 +03:00
89ab44d50e Fix #119 (oltp_insert.lua + --auto-inc=0 fails)
Fix oltp_insert.lua when run with --auto-inc disabled. Add regression tests.
2017-03-12 10:45:03 +03:00
2343e4bbe2 Merge branch '1.0' 2017-02-28 12:30:28 +03:00
9bd33c7e41 Fix grammar in help text for --skip-trx. 2017-02-28 12:30:10 +03:00
db43a57190 Make opt_warmup_time.t more deterministic. 2017-02-15 16:21:38 +03:00
073a1b445f Add --warmup-time option. 2017-02-15 15:53:50 +03:00
800f2e90e6 Rename the 'prewarm' command to 'warmup'. Keep the old name as an alias. 2017-02-14 14:09:52 +03:00
1654ef0a16 Fix OLTP regression tests. 2017-02-09 10:52:26 +03:00
21d87e792e Run OLTP RW regression tests with a single thread for more deterministic results. 2017-02-05 11:22:47 +01:00
08e5b4fa9e Add a new line to an error message. 2017-02-02 23:32:46 +03:00
40c14789aa Export mysql_drv_reconnect() to Lua SQL API. 2017-02-02 10:59:51 +03:00
9fdec9dccf Rename sysbench.option_defs to sysbench.cmdline.options. 2017-02-01 19:31:53 +03:00
b5b1878740 Fix opt_report_interval.t. 2017-02-01 19:31:40 +03:00
4a755b1c5d Make the default intermediate reports format a little more terse. 2017-02-01 18:57:37 +03:00
7f56e219f7 Rename --num-threads to --threads.
Accept the old name with a warning for compatibility.
2017-02-01 17:42:39 +03:00
788fcbb30b Rename --max-requests to --events, --max-time to --time.
Print warnings if old names are used, but accept them for compatibility.
2017-02-01 17:20:22 +03:00
8f227f64b3 Rename --tx-rate to --rate, keep --tx-rate as a deprecated alias. 2017-02-01 16:28:14 +03:00
2a3ca019cb if the test name on the command line is "-", read Lua script from the standard input. 2017-02-01 10:56:05 +03:00
d017ae0c85 Support the deprecated --test option for compatibility with legacy scripts. 2017-02-01 10:10:27 +03:00
443a60bd28 Export histogram API to Lua. 2017-01-31 20:51:47 +03:00
217463c6b2 Really fix api_basic.t. 2017-01-31 14:25:52 +03:00
cb12882e54 Fix api_basic.t. 2017-01-31 13:47:46 +03:00
094c15d555 Make sysbench.cmdline.argv available from the master thread. 2017-01-31 13:21:57 +03:00
abb3f55a5f Export command line arguments + command name to sysbench.cmdline. 2017-01-31 12:52:59 +03:00
419be9f8ea Properly close/deallocate connections on 'prepare'. 2017-01-30 13:54:15 +03:00
591c588fa7 Implement custom report hooks. Add CSV and JSON reporters as examples. 2017-01-29 23:46:43 +03:00
04b4f756d9 Refactor stats reporting to make custom reports possible. 2017-01-29 19:32:14 +03:00
12e56538f3 Parallel 'prepare' and 'prewarm' (MySQL-only) commands for OLTP benchmarks. 2017-01-28 17:55:29 +03:00
49aa0b4322 Fixes #78: better error hints for missing help command
Now if the help command is specified for a script, sysbench first check
if the script impelements a custom help command, and calls it. If no
custom command is defined, it checks whether the script declares any
command line options, in which case it prints their description. If
neither the help() function nor an option declaration is available,
sysbench prints an error message.
2017-01-28 16:20:29 +03:00
49016568ba Implement custom commands + parallel custom commands. 2017-01-28 15:45:16 +03:00
a3b4c0610e Add option declarations to OLTP tests.
All bundled OLTP tests now declare their supported options. Which means:

- unknown options are not be silently accepted, but throw an
  error (fixes #15)
- 'sysbench /any OLTP script/ help' now prints a list of supported
  options, their descriptions, types and default values just as built-in
  tests do (fixes #79)
2017-01-26 14:35:01 +03:00
9d73ed0865 Allow Lua scripts to declare supported options.
Lua scripts can now declare their supported options, in which case
sysbench validates command line arguments and display usage
information.

This is a prerequisite for fixing #15 and #79.
2017-01-26 04:23:55 +03:00
2cda228c7e Command line options refactoring:
- add support for 'validator' functions
- add support to define command line options after test
initialization. It is a prerequisite for option definitions in Lua
scripts
- various code cleanups
2017-01-25 19:09:44 +03:00
a4218987cb Fix help_drv_*.t tests broken by the command line syntax change. 2017-01-25 16:23:38 +03:00
96a1ed4049 Adjust cmdline.t to pass on slower machines. 2017-01-25 01:49:51 +03:00
45e219d038 Change the command line syntax: remove the --test option. 2017-01-25 00:02:59 +03:00
5852c405ff Fix api_sql_mysql.t. 2017-01-23 23:16:12 +03:00
deb4994144 Fix prepared statements for PostgreSQL driver.
libpq requires zero-terminated strings for text arguments.
2017-01-23 22:51:58 +03:00
d89df214f7 Export sysbench.version and sysbench.version_string to Lua. 2017-01-23 14:11:41 +03:00
cf6e8645fd Travis CI portability fixes for api_sql_pgsql.t. 2017-01-23 10:42:48 +03:00
48ea461dd3 Re-enable api_sql_pgsql.t. 2017-01-23 10:12:39 +03:00
29c0299aef Convert OLTP scripts to prepared statements. 2017-01-23 03:32:27 +03:00
7ddab2dcff Fix api_sql_mysql.t to work with older MySQL versions. 2017-01-21 17:19:59 +03:00
cdabf72b7b Implement customer error hooks.
If a Lua script defines the sysbench.hooks.sql_error_ignorable function,
sysbench calls it whenever an SQL error occurs and passes information
about connection, failed query, SQL error number, state and message as
arguments. If the function returns true, the error is ignored and the
entire event is restarted. Otherwise sysbench aborts scripts execution.
2017-01-21 16:58:38 +03:00