integer-net / deployer-timer
Collect duration of deployer tasks
Installs: 4 364
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 12
Forks: 0
Open Issues: 0
Requires
- php: ^7.1.0|^7.2.0|^7.3.0|^8.0.0|^8.1.0
- deployer/deployer: ^6.4
- roave/security-advisories: dev-master
Requires (Dev)
- infection/infection: ^0.12.2
- jakub-onderka/php-parallel-lint: ^1.0
- maglnet/composer-require-checker: ^2.0
- pds/skeleton: ^1.0
- phan/phan: ^1.2
- phpmd/phpmd: ^2.6
- phpro/grumphp: ^0.15.0
- phpstan/phpstan: ^0.11.5
- phpunit/phpunit: ^7.5|^8.0
- squizlabs/php_codesniffer: ^3.4
This package is auto-updated.
Last update: 2024-10-28 12:54:36 UTC
README
This is a recipe for Deployer that lets you track the duration of all tasks
It can create a CSV file in the form of
BEGIN,deploy,1553682974.4,0
BEGIN,build,1553682974.4,0
END,build,1553682975,0.6
BEGIN,copy,1553682975,0
END,copy,1553682978.5,3.5
BEGIN,release,1553682978.5,0
END,release,1553682979.3,0.8
END,deploy,1553682979.3,4.9
The columns are:
BEGIN
orEND
, marking time where a task started or finished- task name
- Unix timestamp (as float)
- Duration of task in seconds (only in
END
rows)
Installation
- Require via composer
composer require integer-net/deployer-timer
Usage
In your deploy.php
file:
-
Include the recipe:
require __DIR__ . '/vendor/integer-net/deployer-timer/recipe/timer.php';
-
Configure the timer at the end:
after('deploy', timer()->createCsvResultTask('path/to/file.csv'));
timer()
must be called after all other tasks are defined. The generated task to create a CSV result file should be added at the end of the task/group that should be timed (e.g.deploy
)
Troubleshooting
If you receive errors about missing classes, include the standalone autoloader:
require __DIR__ . '/vendor/integer-net/deployer-timer/autoload.php';
This way, you can use the recipe without relying on the composer autoloader (e.g. when running deployer as phar)
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
composer test
Runs unit tests, mutation tests and static analysis
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email fs@integer-net.de instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.