Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frameworks/PHP/piko/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.phpactor.json
39 changes: 39 additions & 0 deletions frameworks/PHP/piko/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Piko Benchmarking Test

### Test Type Implementation Source Code

* [JSON](modules/site/controllers/DefaultController.php)
* [PLAINTEXT](modules/site/controllers/DefaultController.php)
* [DB](modules/site/controllers/DatabaseController.php)
* [QUERY](modules/site/controllers/DatabaseController.php)
* [UPDATE](modules/site/controllers/DatabaseController.php)
* [FORTUNES](modules/site/controllers/DatabaseController.php)

## Important Libraries
The tests were run with:
* [Piko](https://piko-framework.github.io/)

## Test URLs
### JSON

http://localhost:8080/json

### PLAINTEXT

http://localhost:8080/plaintext

### DB

http://localhost:8080/db

### QUERY

http://localhost:8080/query?queries=

### UPDATE

http://localhost:8080/update?queries=

### FORTUNES

http://localhost:8080/fortunes
54 changes: 54 additions & 0 deletions frameworks/PHP/piko/benchmark_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"framework": "piko",
"tests": [
{
"default": {
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
"query_url": "/queries?queries=",
"update_url": "/updates?queries=",
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "mysql",
"framework": "Piko",
"language": "PHP",
"flavor": "None",
"orm": "Micro",
"platform": "None",
"webserver": "nginx",
"os": "Linux",
"database_os": "Linux",
"display_name": "Piko Mysql",
"notes": "",
"versus": "None"
},
"postgres": {
"dockerfile": "piko-postgres.dockerfile",
"json_url": "/json",
"plaintext_url": "/plaintext",
"db_url": "/db",
"query_url": "/queries?queries=",
"update_url": "/updates?queries=",
"fortune_url": "/fortunes",
"port": 8080,
"approach": "Realistic",
"classification": "Micro",
"database": "postgres",
"framework": "Piko",
"language": "PHP",
"flavor": "None",
"orm": "Micro",
"platform": "None",
"webserver": "nginx",
"os": "Linux",
"database_os": "Linux",
"display_name": "Piko Postgres",
"notes": "",
"versus": "None"
}
}
]
}
16 changes: 16 additions & 0 deletions frameworks/PHP/piko/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "piko/project-benchmark",
"description": "Application to be tested on the FrameworkBenchmarks.",
"type": "project",
"license": "MIT",
"require": {
"php": ">=8.0",
"piko/framework": "^3.4",
"piko/db-record": "^2.2"
},
"autoload": {
"psr-4": {
"app\\": ""
}
}
}
28 changes: 28 additions & 0 deletions frameworks/PHP/piko/config/app.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

return [
'basePath' => realpath(__DIR__ . '/../'),
'defaultLayoutPath' => '@app/modules/site/layouts',
'defaultLayout' => 'main',
'language' => 'en',
'components' => [
'Piko\View' => [],
'Piko\Router' => [
'construct' => [
[
'routes' => require __DIR__ . '/routes.php',
]
]
],
'PDO' => [
'construct' => [
(getenv('DATABASE_DRIVER') ? getenv('DATABASE_DRIVER') : 'mysql') . ':host=tfb-database;dbname=hello_world',
'benchmarkdbuser',
'benchmarkdbpass'
]
],
],
'modules' => [
'site' => 'app\modules\site\Module'
]
];
17 changes: 17 additions & 0 deletions frameworks/PHP/piko/config/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php
/**
* Routes definitions is a key-value paired array where
* keys are request uris and values are internal routes following this format:
*
* '{moduleId}/{controllerId}/{actionId}'
* '{moduleId}/{subModuleId}/.../{controllerId}/{actionId}'
*/

return [
'/plaintext' => 'site/default/plaintext',
'/json' => 'site/default/json',
'/db' => 'site/database/query',
'/queries' => 'site/database/queries',
'/fortunes' => 'site/database/fortunes',
'/updates' => 'site/database/updates',
];
Loading
Loading