We need to be able to track the performance of queries against the relationship endpoint, as these queries are part of the public API and are used internally to e.g. calculate effective roles and assignments, and to process conditional grantors/grantees.
A possible test would be to:
- create a configurable number of managed users - say 10,000
- create a configurable number of relationships per user - say 5. This could be done via the creation of 5 conditional roles, with conditions which apply to all of the users.
- perform a specified number - e.g. 1000 - queries against the relationship endpoint for each of these users - e.g. managed/user/user_id_xxxx/roles, and track the time taken to perform these queries. These queries should probably not iterate through the first 1000 users, but perform 1000 queries upon random users in the 10,000 user set. This would prevent any caching pre-fetch performed on the part of the database
- the queries should be configurable with fields which specified link expansion. Perhaps a combination of
- no fields
Considering https://bugster.forgerock.org/jira/browse/OPENIDM-14035, it would be optimal if this test would also support the dispatch of the find-relationships-for-resource queryId against the relationship endpoint as well. This would be helpful in determining the full scope of https://bugster.forgerock.org/jira/browse/OPENIDM-14035.