You can just press F12, you will get profiles option there. If you want to check the time required to complete the button click operation, just select Collect Javascript CPU Profiles and say start. Then click on required button and then stop. You will get the detailed analysis of the click there. You can later check where you can reduce the total time taken for the operation. i.e., optimize it. You can also use developer tool in IE for the same purpose.
For optimization you can avoid unnecessary looping, store elements in variable and then use those which are required frequently in your code. etc.
You can also view the errors at the right bottom corner in chrome if any and can resolve those for optimization.
Profiles will give you the time taken by the parent function and the other functions which are called inside the parent function individually which helps to optimize each function independently.
When you start and stop the profiler for any operation like click of button, you will get the total time in seconds or milliseconds for that operation in Chrome profiles. If time is more that user acceptance time for that operation, you can modify/optimize your javascript code. If any operation is taking more than user acceptance time, that means your site is not having good performance and it needs optimization. The user acceptance time totally depends on the type of operation