{"repo":"tomloprod/time-warden","free":true,"listed":false,"github":"https://github.com/tomloprod/time-warden","clone":"git clone https://github.com/tomloprod/time-warden.git","description":"TimeWarden is a lightweight PHP library that enables you to monitor the processing time of tasks (useful during the development stage) and allows you to set maximum execution times to tasks, empowering reactive actions when tasks exceed their estimate duration.","language":"PHP","stars":167,"topics":["debugging","monitoring-tool","performance","php","fluent-api"],"license":"MIT","category":"dev-tools","readme_excerpt":"------ ⏱️ About TimeWarden TimeWarden is a lightweight PHP library that allows you to monitor the processing time of tasks ( useful during the development stage and debugging ) and also lets you set estimated execution times for tasks, enabling reactive actions when tasks exceed their estimated duration. TimeWarden uses high-resolution timing ( hrtime ) for nanosecond precision , ensuring accurate measurements even for very fast operations. TimeWarden is framework-agnostic, meaning it's not exclusive to any particular framework. It can seamlessly integrate into any PHP application, whether they utilize frameworks like Laravel (🧡), Symfony, or operate without any framework at all. ✨ Getting Started Reactive Actions You can specify an estimated execution time for each task and set an action to be performed when the time is exceeded ( example: send an email, add an entry to the error log, etc. ). Example Available methods If you're not convinced about using onExceedsMilliseconds , you have other options: Quick Measurement TimeWarden provides a convenient measure() method that automatically handles task creation, starting, and stopping for you. This method executes a callable and returns the execution time in milliseconds. Example The measure() method: - Automatically creates a task with the provided name (or 'callable' by default) - Starts timing before execution - Executes your callable - Stops timing after execution (even if an exception occurs) - Returns the duration in mill","default_branch":null,"files":null,"tree":[],"storefront":"/r/tomloprod","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/tomloprod/time-warden/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}