[FOLIO-2592] folio-perf-test: Drop random, use deterministic records/search strings Created: 07/May/20 Updated: 13/Aug/21 |
|
| Status: | Open |
| Project: | FOLIO |
| Components: | Continuous Integration |
| Affects versions: | None |
| Fix versions: | None |
| Type: | Bug | Priority: | TBD |
| Reporter: | Julian Ladisch | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | keep-bug, performance, platform-backlog | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | CP: Roadmap backlog | ||||||||
| Story Points: | 2 | ||||||||
| Development Team: | Core: Platform | ||||||||
| Description |
|
We want folio-perf-test to run exactly the same queries each day. The setup picks 20 instances, 20 available items, 20 locations and 20 users (limit = number of threads):
Perf_Setup - GET inventory_instances?limit={limit}
Perf_Setup - GET inventory_items?query=(status.name=="Available")&limit={limit}
Perf_Setup - GET locations?limit={limit}
Perf_Setup - GET users?limit={limit}
This is not deterministic because there is not sort clause allowing the database to return any records. Several tests pick values for the query search string by random, for example "FOLIO-2154 search instance by contributors new array syntax" = "Perf - GET inventory/instances (contributors =/@name "{name}") sortby title":
Random rand = new Random();
...
def pick = rand.nextInt(size);
def obj = resp.instances[pick].contributors;
for (i = 0; i < obj.size(); i++) {
def val = obj[i].name.trim();
vars.put("contributorName", val);
For each test that uses Random come up with a hard-coded list. It should contain search strings with low and high hit count. |