|
| 1 | +# Integer_Net Deployer Timer |
| 2 | + |
| 3 | +[![Latest Version on Packagist][ico-version]][link-packagist] |
| 4 | +[![Software License][ico-license]](LICENSE.md) |
| 5 | +[![Build Status][ico-travis]][link-travis] |
| 6 | +[![Coverage Status][ico-scrutinizer]][link-scrutinizer] |
| 7 | +[![Quality Score][ico-code-quality]][link-code-quality] |
| 8 | +[![Total Downloads][ico-downloads]][link-downloads] |
| 9 | + |
| 10 | + |
| 11 | +This is a recipe for [Deployer](https://deployer.org/) that lets you track the duration of all tasks |
| 12 | + |
| 13 | +It can create a CSV file in the form of |
| 14 | +``` |
| 15 | +BEGIN,deploy,1553682974.4,0 |
| 16 | +BEGIN,build,1553682974.4,0 |
| 17 | +END,build,1553682975,0.6 |
| 18 | +BEGIN,copy,1553682975,0 |
| 19 | +END,copy,1553682978.5,3.5 |
| 20 | +BEGIN,release,1553682978.5,0 |
| 21 | +END,release,1553682979.3,0.8 |
| 22 | +END,deploy,1553682979.3,4.9 |
| 23 | +``` |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +1. Require via composer |
| 28 | + ``` |
| 29 | + composer require integer-net/deployer-timer |
| 30 | + ``` |
| 31 | +
|
| 32 | +## Usage |
| 33 | +
|
| 34 | +In your `deploy.php` file: |
| 35 | +
|
| 36 | +1. Include the recipe: |
| 37 | + ``` |
| 38 | + require __DIR__ . '/vendor/integer-net/deployer-timer/recipe/timer.php'; |
| 39 | + ``` |
| 40 | +2. Configure the timer **at the end**: |
| 41 | + ``` |
| 42 | + after('deploy', timer()->createCsvResultTask('path/to/file.csv')); |
| 43 | +
|
| 44 | + ``` |
| 45 | + |
| 46 | + `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`) |
| 47 | +
|
| 48 | +## Change log |
| 49 | +
|
| 50 | +Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. |
| 51 | +
|
| 52 | +## Testing |
| 53 | +
|
| 54 | +``` bash |
| 55 | +composer test |
| 56 | +``` |
| 57 | + |
| 58 | +Runs unit tests, mutation tests and static analysis |
| 59 | + |
| 60 | +## Contributing |
| 61 | + |
| 62 | +Please see [CONTRIBUTING](CONTRIBUTING.md) for details. |
| 63 | + |
| 64 | +## Security |
| 65 | + |
| 66 | +If you discover any security related issues, please email fs@integer-net.de instead of using the issue tracker. |
| 67 | + |
| 68 | +## Credits |
| 69 | + |
| 70 | +- [Fabian Schmengler][link-author] |
| 71 | +- [All Contributors][link-contributors] |
| 72 | + |
| 73 | +## License |
| 74 | + |
| 75 | +The MIT License (MIT). Please see [License File](LICENSE.txt) for more information. |
| 76 | + |
| 77 | +[ico-version]: https://img.shields.io/packagist/v/integer-net/deployer-timer.svg?style=flat-square |
| 78 | +[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square |
| 79 | +[ico-travis]: https://img.shields.io/travis/integer-net/deployer-timer/master.svg?style=flat-square |
| 80 | +[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/integer-net/deployer-timer.svg?style=flat-square |
| 81 | +[ico-code-quality]: https://img.shields.io/scrutinizer/g/integer-net/deployer-timer.svg?style=flat-square |
| 82 | +[ico-downloads]: https://img.shields.io/packagist/dt/integer-net/deployer-timer.svg?style=flat-square |
| 83 | + |
| 84 | +[link-packagist]: https://packagist.org/packages/integer-net/deployer-timer |
| 85 | +[link-travis]: https://travis-ci.org/integer-net/deployer-timer |
| 86 | +[link-scrutinizer]: https://scrutinizer-ci.com/g/integer-net/deployer-timer/code-structure |
| 87 | +[link-code-quality]: https://scrutinizer-ci.com/g/integer-net/deployer-timer |
| 88 | +[link-downloads]: https://packagist.org/packages/integer-net/deployer-timer |
| 89 | +[link-author]: https://github.com/schmengler |
| 90 | +[link-contributors]: ../../contributors |
0 commit comments