Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: sysbench 测试的时候,1个tps里面有多少条语句
May I ask, during sysbench testing, how many statements are there in 1 tps? Where can I see this in the lua code?
Each type is different. For example, a point query has one TPS, and you can roughly figure it out by dividing QPS by TPS.
The specific Lua script you are running has corresponding functions that will call specific functions in common. This is related to the parameter settings, and the result is that QPS divided by TPS gives the average number of statements executed per transaction.
This method is not precise, as some statements might be automatically committed and not in the form of begin; dml statement; commit.
Are there any scenarios that require precise values? In some scenarios, you can use parameters to control the types and number of SQL statements within a transaction.
The one replied by forever is correct. Each event counts as one TPS. That is, each execution of the event function counts as one TPS. Then, you can look at the code to see how many SQL statements are inside. Different scenarios will have different combinations of SQL statements.
Okay, I’ll go check the code. Thank you, master.
You can check this post
Need to look at the specific function, sysbench determines the number of SQLs for each transaction’s logic.
This topic will be automatically closed 60 days after the last reply. No new replies are allowed.