- Notifications
You must be signed in to change notification settings - Fork5
Commit7bafffe
committed
pgbench: Allow changing weights for scripts
Previously, all scripts had the same probability of being chosen whenmultiple of them were specified via -b, -f, -N, -S. With this commit,-b and -f now search for an "@" in the script name and use the integerfound after it as the drawing probability for that script.(One disadvantage is that if you have script whose names contain @, youare now forced to specify "@1" at the end; otherwise the name's @ isconfused with a weight separator. We don't expect many pgbench scriptwith @ in their names in the wild, so this shouldn't be too serious aproblem.)While at it, rework the interface between addScript, process_file,process_builtin, and findBuiltin. It had gotten a bit out of hand withrecent commits.Author: Fabien CoelhoReviewed-By: Andres Freund, Robert Haas, Álvaro Herrera, Michaël PaquierDiscussion:http://www.postgresql.org/message-id/alpine.DEB.2.10.1603160721240.1666@sto1 parentb46d9be commit7bafffe
2 files changed
+170
-87
lines changedLines changed: 16 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
265 |
| - | |
266 |
| - | |
| 265 | + | |
| 266 | + | |
267 | 267 |
| |
268 | 268 |
| |
269 | 269 |
| |
| 270 | + | |
| 271 | + | |
270 | 272 |
| |
271 | 273 |
| |
272 | 274 |
| |
| |||
322 | 324 |
| |
323 | 325 |
| |
324 | 326 |
| |
325 |
| - | |
326 |
| - | |
| 327 | + | |
| 328 | + | |
327 | 329 |
| |
328 | 330 |
| |
329 | 331 |
| |
330 | 332 |
| |
| 333 | + | |
| 334 | + | |
331 | 335 |
| |
332 | 336 |
| |
333 | 337 |
| |
| |||
687 | 691 |
| |
688 | 692 |
| |
689 | 693 |
| |
690 |
| - | |
| 694 | + | |
| 695 | + | |
691 | 696 |
| |
692 | 697 |
| |
| 698 | + | |
| 699 | + | |
| 700 | + | |
693 | 701 |
| |
694 | 702 |
| |
695 | 703 |
| |
| |||
1194 | 1202 |
| |
1195 | 1203 |
| |
1196 | 1204 |
| |
| 1205 | + | |
| 1206 | + | |
1197 | 1207 |
| |
1198 | 1208 |
| |
1199 |
| - | |
1200 |
| - | |
1201 |
| - | |
1202 |
| - | |
| 1209 | + | |
1203 | 1210 |
| |
1204 | 1211 |
| |
1205 | 1212 |
| |
|
0 commit comments
Comments
(0)