mirror of
https://github.com/suitenumerique/drive.git
synced 2026-09-23 18:15:15 +02:00
We need to measure backend response times and error codes from 100 up to 100k simultaneous users, on any instance. The scenario simulates a full user session (browse, recents, shared-with-me, folder creation, upload, trash, hard-delete) with randomized think times, using the e2e auth endpoint instead of the IDP, out of scope like the WOPI editors. Everything is property-driven (BASE_URL, USERS, USER_OFFSET...) so the same plan runs unchanged against any instance and across distributed injectors, each with its own USER_OFFSET to keep generated user emails globally unique. Uploads reproduce the frontend flow (item creation, presigned PUT to the object storage, upload-ended) and randomly pick a fixture entry; folder entries mirror the frontend folder upload by materializing the hierarchy before uploading each file into its parent.
11 lines
561 B
Groovy
11 lines
561 B
Groovy
// Splits the current upfile_N entry ("relative dir" + SEP + "absolute path"
|
|
// + SEP + "name", see plan_upload.groovy) and resolves the parent item id
|
|
// and mimetype for the file about to be uploaded.
|
|
def parts = vars.get("current_upfile").split("\u001F", 3)
|
|
def relDir = parts[0]
|
|
vars.put("cf_parent", relDir.isEmpty() ? vars.get("folder_id") : vars.get("upfid_" + relDir))
|
|
vars.put("cf_abs", parts[1])
|
|
vars.put("cf_name", parts[2])
|
|
def mime = java.net.URLConnection.guessContentTypeFromName(parts[2])
|
|
vars.put("cf_mime", mime ?: "application/octet-stream")
|