>> [...] and that a subsequent -w modifies the meaning of the
>> script-specifiying argument already read. That strikes me as a very
>> unintuitive interface.
>
> Ok, I understand this "afterward modification" objection.
>
> What if the -w would be required *before*, and supply a weight for (the
> first/maybe all) script(s) specified *afterwards*, so it does not modify
> something already provided? I think it would be more intuitive, or at least
> less surprising.
Here is a v3 which does that. If there is a better idea, do not hesitate!
sh> ./pgbench -w 9 -f one.sql -f now.sql -T 2 -P 1 --per-script-stats starting vacuum...end. progress: 1.0 s, 24536.0
tps,lat 0.039 ms stddev 0.024 progress: 2.0 s, 25963.8 tps, lat 0.038 ms stddev 0.015 transaction type: multiple
scriptsscaling factor: 1 query mode: simple number of clients: 1 number of threads: 1 duration: 2 s number of
transactionsactually processed: 50501 latency average = 0.039 ms latency stddev = 0.020 ms tps = 25249.464772
(includingconnections establishing) tps = 25339.454154 (excluding connections establishing) SQL script 0, weight 9:
one.sql - 45366 transactions (89.8% of total, tps = 22682.070035) - latency average = 0.038 ms - latency stddev =
0.016ms SQL script 1, weight 1: now.sql - 5135 transactions (10.2% of total, tps = 2567.394737) - latency average =
0.044ms - latency stddev = 0.041 ms
--
Fabien.