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)
- Require via composer
composer require integer-net/deployer-timer
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
)
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)
Please see CHANGELOG for more information on what has changed recently.
composer test
Runs unit tests, mutation tests and static analysis
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.