[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:
Relates
relates to RMB-613 optimizedSql performance regression Closed
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.
Replace all random and all non-deterministic record/search string picking.

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.
One possibility is using limit={limit}&query=id==1234567* sortBy id (replace 1234567 by a suitable prefix that returns more than 20 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.


Generated at Thu Feb 08 23:21:47 UTC 2024 using Jira 1001.0.0-SNAPSHOT#100246-sha1:7a5c50119eb0633d306e14180817ddef5e80c75d.