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
645 changes: 246 additions & 399 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"ext-json": "*",
"ext-zlib": "*",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0|^12.0",
"perfbase/php-sdk": "^0.3.0",
"perfbase/php-sdk": "1.0.0",
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
Expand Down
62 changes: 27 additions & 35 deletions config/perfbase.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,20 @@
*/
'enabled' => env('PERFBASE_ENABLED', false),

/*
|--------------------------------------------------------------------------
| Debug Mode
|--------------------------------------------------------------------------
*/
'debug' => env('PERFBASE_DEBUG', false),

/*
|--------------------------------------------------------------------------
| Log Errors
|--------------------------------------------------------------------------
*/
'log_errors' => env('PERFBASE_LOG_ERRORS', true),

/*
|--------------------------------------------------------------------------
| API Key - Required - Used to authenticate your project with Perfbase.
Expand Down Expand Up @@ -53,35 +67,17 @@

/*
|--------------------------------------------------------------------------
| Sending Configuration - Used to control when data is sent to Perfbase.
| HTTP Timeout - Timeout in seconds for API requests.
|--------------------------------------------------------------------------
|
| If you'd like to buffer data before sending it to Perfbase, you can configure
| the `mode` option in the transmission settings. The available mode values are:
| - 'sync': Sends data immediately without buffering.
| - 'file': Stores data in files before sending it to Perfbase.
| - 'database': Caches data in a database table before sending.
|
| When using modes other than 'sync', data will be collected locally.
| To process and send this buffered data to Perfbase, use the `perfbase:sync`
| Artisan command. It's recommended to set up a cron to periodically run it.
|
*/
'sending' => [
'mode' => env('PERFBASE_SENDING_MODE', 'sync'),
'timeout' => env('PERFBASE_TIMEOUT', 5),
'proxy' => env('PERFBASE_PROXY'),
'config' => [
'sync' => [],
'file' => [
'path' => storage_path('perfbase'),
],
'database' => [
'connection' => 'default',
'table' => 'perfbase_cache',
]
]
],
'timeout' => env('PERFBASE_TIMEOUT', 5),

/*
|--------------------------------------------------------------------------
| HTTP Proxy - Optional proxy for API requests.
|--------------------------------------------------------------------------
*/
'proxy' => env('PERFBASE_PROXY'),

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -159,10 +155,8 @@
*/
'include' => [
'http' => ['.*'],
'artisan' => ['.*'],
'jobs' => ['.*'],
'schedule' => ['.*'],
'exception' => ['.*'],
'console' => ['.*'],
'queue' => ['.*'],
],

/*
Expand All @@ -176,10 +170,8 @@
*/
'exclude' => [
'http' => [],
'artisan' => ['queue:work'],
'jobs' => [],
'schedule' => [],
'exception' => [],
'console' => ['queue:work'],
'queue' => [],
],

];

This file was deleted.

6 changes: 6 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
</testsuite>
</testsuites>

<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>

<php>
<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
Expand Down
52 changes: 0 additions & 52 deletions src/Caching/CacheStrategy.php

This file was deleted.

25 changes: 0 additions & 25 deletions src/Caching/CacheStrategyFactory.php

This file was deleted.

120 changes: 0 additions & 120 deletions src/Caching/DatabaseStrategy.php

This file was deleted.

Loading
Loading