Files
lasuite-drive/load-tests/scripts/prep_file.groovy
T
Nathan VasseandNicolas Clerc 9084163ed9 (load-tests) add a JMeter basic user session scenario
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.
2026-09-03 13:53:35 +02:00

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")