aboutsummaryrefslogtreecommitdiff
path: root/modules/benchmark/sysbench.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-08-13 23:02:22 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-08-14 20:02:42 -0700
commit80b2c1ca5a931c3141e72d6b59ce2d917cb9c07e (patch)
tree14cc724ab22faaf52ea9e34695bc86ae5b88fbc7 /modules/benchmark/sysbench.c
parentc7f5950f47f17e636da0cb5fd20e497ae9bda740 (diff)
sysbench: minor fixes
idk what. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/benchmark/sysbench.c')
-rw-r--r--modules/benchmark/sysbench.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/modules/benchmark/sysbench.c b/modules/benchmark/sysbench.c
index 19c30384..e848b3c6 100644
--- a/modules/benchmark/sysbench.c
+++ b/modules/benchmark/sysbench.c
@@ -22,6 +22,7 @@
/* known to work with:
* sysbench 0.4.12 --> r:4012
+ * sysbench 1.0.11 --> r:1000011
* sysbench 1.0.15 --> r:1000015
*/
@@ -33,7 +34,7 @@ struct sysbench_ctx {
bench_value r;
};
-int sysboj_version() {
+int sysbench_version() {
int ret = -1;
int v1 = 0, v2 = 0, v3 = 0, mc = 0;
gboolean spawned;
@@ -80,12 +81,12 @@ static gboolean sysbench_run(struct sysbench_ctx *ctx) {
snprintf(ctx->r.extra, 255, "--time=%d %s", ctx->max_time, ctx->parms_test);
util_compress_space(ctx->r.extra);
- int expecting = sysboj_version();
+ int expecting = sysbench_version();
if (expecting < 1000000) {
- /* sysbench [general-options]... --test=<test-name> [test-options]... command */
+ /* v0.x.x: sysbench [general-options]... --test=<test-name> [test-options]... command */
cmd_line = g_strdup_printf("sysbench --num-threads=%d --max-time=%d --test=%s %s run", ctx->threads, ctx->max_time, ctx->test, ctx->parms_test);
} else {
- /* sysbench [options]... [testname] [command] */
+ /* v1.x.x: sysbench [options]... [testname] [command] */
cmd_line = g_strdup_printf("sysbench --threads=%d --time=%d %s %s run", ctx->threads, ctx->max_time, ctx->parms_test, ctx->test);
}
//bench_msg("\ncmd_line: %s", cmd_line);
@@ -170,8 +171,7 @@ sysbench_failed:
return 0;
}
-void benchmark_memory_single(void)
-{
+void benchmark_memory_single(void) {
struct sysbench_ctx ctx = {
.test = "memory",
.threads = 1,
@@ -191,8 +191,7 @@ void benchmark_memory_single(void)
bench_results[BENCHMARK_MEMORY_SINGLE] = ctx.r;
}
-void benchmark_memory_dual(void)
-{
+void benchmark_memory_dual(void) {
struct sysbench_ctx ctx = {
.test = "memory",
.threads = 2,
@@ -212,8 +211,7 @@ void benchmark_memory_dual(void)
bench_results[BENCHMARK_MEMORY_DUAL] = ctx.r;
}
-void benchmark_memory_quad(void)
-{
+void benchmark_memory_quad(void) {
struct sysbench_ctx ctx = {
.test = "memory",
.threads = 4,