## System Statistics

---
1. Use command ```php artisan app:boot_statistics``` to start the command.
2. Make sure that the command ```php artisan queue:run``` is running each minute, below are cases based on OS:
- Linux Case: Registered in Cron jobs and maintained by Supervisor package.
- Windows Case: Registered in Task Scheduler.


3. In case you want to execute statistics manually without queues or for debuging, use the code 
```php
SystemStatistics::generateStatistics([
    'items_count',
    'biblioitems_count',
    'publisher_count',
    'author_count'
],true);
```
- Note 1:
> The first parameter is an array of statistics that you want to generate. Set it to null to generate all statistics. You can find the list of the statistics in configuration file `app\config\system_statistics.php`.

- Note 2:
> If the second parameter is set to true, then the function will generate only statistics for global data. Set it to false to generate for global and for each branche.