Merge branch 'main' into 1.5.x-db-storage-metrics

# Conflicts:
#	app/config/specs/open-api3-latest-console.json
#	app/config/specs/swagger2-latest-console.json
#	app/controllers/api/project.php
#	src/Appwrite/Utopia/Response/Model/UsageProject.php
#	tests/e2e/General/UsageTest.php
This commit is contained in:
Bradley Schofield
2024-09-19 15:37:27 +09:00
5137 changed files with 393304 additions and 1146 deletions
+18
View File
@@ -499,6 +499,18 @@ If you are in PHP Storm you don't need any plugin. Below are the settings requir
2. If needed edit the **dev/xdebug.ini** file to your needs.
3. Launch your Appwrite instance while your debugger is listening for connections.
## Profiling
Appwrite uses XDebug [Profiler](https://xdebug.org/docs/profiler) for generating **CacheGrind** files. The generated file would be located in each of the `appwrite` containers inside the `/tmp/xdebug` folder.
To disable the profiler while debugging remove the `,profiler` mode from the `xdebug.ini` file
```diff
zend_extension=xdebug
[xdebug]
-xdebug.mode=develop,debug,profile
+xdebug.mode=develop,debug
```
### VS Code Launch Configuration
```json
@@ -543,6 +555,12 @@ To run end-2-end tests for a specific service use:
docker compose exec appwrite test /usr/src/code/tests/e2e/Services/[ServiceName]
```
To run one specific test:
```bash
docker compose exec appwrite vendor/bin/phpunit --filter [FunctionName]
```
## Benchmarking
You can use WRK Docker image to benchmark the server performance. Benchmarking is extremely useful when you want to compare how the server behaves before and after a change has been applied. Replace [APPWRITE_HOSTNAME_OR_IP] with your Appwrite server hostname or IP. Note that localhost is not accessible from inside the WRK container.