Commit Graph

116 Commits

Author SHA1 Message Date
db621cd10a Print queue length and concurrency in the --rate mode.
This has been lost in refactoring beteen 0.5 and 1.0.
2017-07-05 00:16:52 +03:00
3ecc6b6762 Remove busy-wait in --rate mode to avoid CPU hogging.
In the bounded rate (--rate) mode, if the queue is empty, sleep for a
certain amount of time depending on the requested rate and the number of
worker threads instead of spinning on the queue.

Clean up some code duplication by removing sb_next_event().
2017-07-05 00:16:52 +03:00
36e733922d Merge upstream changes 2017-06-28 18:33:36 +02:00
009551f4e3 Use same defaults as built-in options 2017-06-28 18:28:06 +02:00
6f3a4690ff Emit cumulative json reports 2017-06-28 18:26:44 +02:00
1e0c5b8cd1 Minor fix for prime-test.lua. 2017-06-28 19:20:35 +03:00
7312515be0 Add two examples of custom lua cpu tests 2017-06-28 17:20:07 +02:00
5edb487b4f Merge branch '1.0' 2017-06-07 22:39:46 +03:00
66a410b192 Fix db_connect() in legacy API to initialize db_driver properly.
Fixes #146.
2017-06-07 22:09:55 +03:00
b57453df60 Report events per second in the CPU benchmark. Ref. #140. 2017-06-07 21:49:46 +03:00
46f790b773 Merge branch '1.0' 2017-06-04 20:04:09 +03:00
6356e2b45e Fix #139: Json format has trailing comma
Remove a superfluous comma from the JSON reporter.
2017-06-04 20:03:17 +03:00
3cf7494024 Merge branch '1.0' 2017-05-31 21:29:07 +03:00
78024349bd sb_fileio.c: suggest to run prepare step
A recurring reason for errors is forgetting to run the prepare
step before running the file io test.

Write a warning line suggesting to run prepare.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2017-05-31 20:59:47 +03:00
fd34a95595 fix typo in --rand-pareto-h description 2017-05-27 13:42:03 +03:00
cc23297b2d fix typo in --rand-pareto-h description 2017-05-27 09:59:19 +02:00
18d524f166 Converted THREAD_INIT_TIMEOUT constant to a optional perameter with default 30. 2017-05-17 14:58:49 -07:00
1acf417f51 Merge branch '1.0' 2017-05-15 15:20:34 +03:00
538521184a Compatibility fix for MySQL 8.0 client libraries.
The type of MYSQL_BIND::is_null has been changed from my_bool* to bool*
in MySQL 8.0. Since the size bool is not defined by the standard, we
either need to change the DB and Lua APIs to ensure is_null points to a
large enough buffer for MySQL API to store a bool, or do conversions
between sysbench and MySQL data structures. For now, just assert that
sizeof(bool) == 1, which is likely the case on all supported platforms.
2017-05-15 14:17:21 +03:00
fa962b79b2 Merge branch '1.0' 2017-05-01 22:11:22 -07:00
3809f905e2 Fix a bug resulting in incorrect latencies reported from the --rate mode. 2017-05-01 21:44:49 -07:00
b3081ae594 Merge branch '1.0' 2017-04-28 17:16:39 -07:00
e472fb8aff Use sb_rand_uniform() instead of rand() in sb_mutex.c. 2017-04-28 17:16:06 -07:00
d15d273226 Fix #130: Mutex Benchmark Documentation
Fix --mutex-loops description to say it's the number of empty loops
outside the lock. Also, make the loops really empty by using a compiler
barrier instead of incrementing a local variable.
2017-04-28 17:08:54 -07:00
5eb3f638bd Merge branch '1.0' 2017-04-14 00:08:46 +03:00
75b530c7fc Fix builds with MariaDB client libraries. 2017-04-12 19:34:30 +03:00
6bb15d736d Merge branch '1.0' 2017-04-12 00:26:29 +03:00
6ad3f09a07 Fix builds with MySQL 8.0.1 client libraries.
my_bool has been replaced with bool in MySQL 8.0.1.
2017-04-12 00:24:34 +03:00
3348e8dfa3 Remove unused gresults variable from drv_mysql.c. 2017-04-12 00:21:46 +03:00
1e20657eb4 Merge branch '1.0' 2017-04-02 11:44:34 +03:00
480c34c33b Report errors thrown by the script properly with the 'sysbench modulename' syntax. 2017-04-02 10:42:01 +03:00
17125bad89 Merge branch '1.0' 2017-03-31 13:56:22 +03:00
fb7e62db24 Allow benchmarks to be specified as a module name, i.e. a require() argument. 2017-03-31 13:52:55 +03:00
b165b838b5 Merge branch '1.0' 2017-03-29 23:35:55 +03:00
1fc8326c0d Prevent compiler from optimizing memory loads/stores in the memory benchmark. 2017-03-29 23:33:58 +03:00
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
0a42ae1a92 Merge branch '1.0' 2017-03-29 14:16:52 +03:00
7fcbf2e025 Fix system ConcurrencyKit builds on ARMv6.
The problem reported for i686 in #118 also affects ARMv6. Fixed by
allowing workarounds in sb_ck_pr.h to work on architectures other than
i686.
2017-03-29 14:14:19 +03:00
b33e546fcf Add --luajit-cmd option which is equivalent to 'luajit -j'. 2017-03-29 00:21:45 +03:00
8914ed1a18 Merge branch '1.0' 2017-03-17 11:58:54 +03:00
154335edf6 Rename sb_option_copy() to sb_opt_copy() for consistency with other functions. 2017-03-17 11:57:39 +03:00
03c7eb5c29 Fix #123: Table already exists error on prepare
When the deprecated --num-threads option was used in OLTP prepare, the
sysbench.opt.threads variable exported to Lua scripts contained the
default value of 1, even though the actual number of threads created by
sysbench was higher. Which led to unexpected fireworks.

Now the deprecated options override the correspond sysbench.opt.*
variables when used.
2017-03-17 11:53:04 +03:00
2d2ad20cb9 Merge branch '1.0' 2017-03-13 14:40:34 +03:00
d2bc5d50f8 Fix warning in 32-bit builds. 2017-03-13 14:38:25 +03:00
05f2a8e87b Fix #118: Build fails on i686 when using system ck
Provide compatibility wrappers for system (i.e. distribution-provided)
ConcurrencyKit on i386. Unlike bundled ConcurrencyKit, older versions
that may be provided by distributions do not support CK_USE_CC_BUILTINS,
which makes implementing 64-bit atomics impossible on x86 (32-bit).

Detect if 64-bit atomics are not provided at compile stage and if so,
resort to GCC builtin implementations.
2017-03-13 14:38:19 +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
6c7c13913d Fix -Wformat warnings in sb_fileio.c. 2017-03-10 11:43:25 +03:00
2343e4bbe2 Merge branch '1.0' 2017-02-28 12:30:28 +03:00