I want to know how long my stored procedure is taking to execute from the time an external process hits the database and says execute this to the time the database returns b
SIMPLEST,CHEAPEST OPTION You could log events to a "debug" table and check the duration between the logs, like for ex. Log event before insert into table a with time stamp a into debug table. Log event after insert into table a with timestamp b into debug table.
It's a bit time consuming if you're stored procedure is anything more than 5 lines, but it will help you none the less. Also implement a debug flag, so when you need to log time stamps, set the flag at the top of the procedure to true, and then re-compile it. When executing the stored procedure, it will then go and log all your events, when done with debugging, set the flag to false and re-compile.