Code reorganization Update
This commit is contained in:
@@ -62,13 +62,18 @@ Updates the numeric benchmarking metrics (`search_time` and `total_time`) for a
|
||||
- **Request Body:** JSON object containing floats: `{"search_time": 25.4, "total_time": 105.8}`
|
||||
- **Response:** JSON object `{"status": "success"}`
|
||||
|
||||
### `PUT /api/simulations/:id/hardware`
|
||||
Updates the physical hardware strings tied directly to a specific simulation run to properly map system configurations to benchmark outcomes.
|
||||
- **Request Body:** JSON object containing string fields (nullable): `{"cpu_info": "Intel i9", "gpu_info": "RTX 4090", "ram_info": "64GB DDR5"}`
|
||||
- **Response:** JSON object `{"status": "success"}`
|
||||
|
||||
### `PUT /api/simulations/:id/rename`
|
||||
Renames a specific simulation. Automatically updates the database and physically renames the matching directory path on the system filesystem to mirror structural links.
|
||||
- **Request Body:** JSON object containing the new underlying name: `{"name": "new_simulation_name"}`
|
||||
- **Response:** JSON object `{"status": "success", "new_name": "new_simulation_name"}`
|
||||
|
||||
### `POST /api/simulations/:id/upload`
|
||||
Uploads a new media or data resource file directly into a completed simulation run. Supports both images (e.g., PNGs) and heavy video files (e.g., AVIs) out of the box with an initial multi-part allocation pool mapping of 500 MB.
|
||||
Uploads a new media or data resource file directly into a completed simulation run. Supports both images (e.g., PNGs) and heavy video files (e.g., AVIs) out of the box with an initial multi-part memory bounds mapping of 32 MB (spilling to disk for larger files).
|
||||
- **Request Data:** `multipart/form-data` packet using the `file` keyword carrying the binary data blocks.
|
||||
- **Behavior:** The Go service validates the simulation ID exists, dynamically builds the memory pool, opens a stream writer caching the binary blob into the `../results/simulation_X/filename.ext` directory path, and records the resource in the primary SQLite instance.
|
||||
- **Response:** JSON object `{"status": "success", "filename": "example.png"}`
|
||||
|
||||
Reference in New Issue
Block a user