1

I'm trying to create graphs with sysbench cumulative output, so that I can compare results of different benchmarks.

So far have been able to generate csv files with intermediate statistics using hooks in lua scripts. I'm not able to do the same with cumulative results, so I'm trying to do it by parsing the results with sed and awk, but it looks very time consuming.

Can anybody help me out with this? I'm using sysbench 1.0.20

thank you very much Gianluca

Gianluca
  • 21
  • 2

1 Answers1

1

You don't have to parse the output. I've done this long ago before sysbench supported CSV reports, and it was difficult and error-prone.

Now, you can make sysbench produce CSV output instead of the formatted "human-readable" summary.

Here's what I do with current versions of sysbench:

Copy one of the sysbench scripts, like oltp_read_only.lua. Open it in an editor.

Add these lines:

function report_noop()
  -- do nothing
end

sysbench.hooks.report_intermediate = sysbench.report_csv
sysbench.hooks.report_cumulative = report_noop

Now when I run my customized lua script as the argument to sysbench, it outputs lines of text for each iteration, and no output at the end of the report.

Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
  • Hi Bill, thx for your support. I did the same myself, but I found out that if you summarize the intermediate csv output you get results that are different from the cumulative "human-readable" outputs, sometimes by non-neglectable percentage. That's why I want to parse the cumulative output. It looks more reliable. BTW I got it done, by looking at George Liu's [work](https://github.com/centminmod/centminmod-sysbench) – Gianluca Jun 18 '20 at 07:01