1. A method comprising: executing program instructions on a computer system, wherein the program instructions execute to: receive program code of a software application, wherein the program code includes bytecode for a virtual machine; automatically analyze the bytecode to detect access to a database; and automatically add additional bytecode to the bytecode of the software application by adding additional information to the decompiled source code representation and re-compiling the source code representation with the additional information into bytecode, wherein automatically adding the additional bytecode to the bytecode of the software application comprises automatically adding the additional bytecode during execution of the software application, wherein the additional bytecode is configured to automatically determine a number of database connections opened by the software application and an amount of time a connection to the database stays open.