fcsonline / drill

Drill is an HTTP load testing application written in Rust
GNU General Public License v3.0
2.05k stars 108 forks source link

Add a "pick" option for requests #148

Closed hendric-dev closed 2 years ago

hendric-dev commented 2 years ago

Resolves #131

Allows to pick a subset of items from with_items.
Pick limits the amount of requests done instead of doing one for each item.
When used in conjunction with shuffle, it can be used to send one request with a random item from the list.

- name: One request with a random item
  request:
    url: /api/users/{{ item }}
  with_items:
    - 70
    - 73
    - 75
  shuffle: true
  pick: 1
fcsonline commented 2 years ago

Awesome addition! 🙌

fcsonline commented 2 years ago

Thanks for working on this! 🙌

Last things before merge. Can you squash everything in a single commit and rebase it from master? There are two new checks in the CI that were not present when you forked.

hendric-dev commented 2 years ago

Squashed it to one commit, but the rebase from master didn't bring anything new in. Fork seems to be up2date.

fcsonline commented 2 years ago

Sorry @hendric-dev, my fault. I misconfigured the github actions. Merging and I will fix it later.

Thanks for this addition! :clap: