Drupal's event system allow to create triggers when an event has been happened like create a custom hook on drupal 7.
Use Event Subscriber service.
The EventSubscriber allow to execute an action on boot as hook_boot or hook_init of drupal 7.
To force usage of a specific key, put in your ~/.ssh/config file :
The apache benchmark tool is very basic, and while it will give you a solid idea of some performance.
To get database table columns names of a mysql database you can use "DESCRIBE my_table;" method.