There is no proper JS profiling in Google Analytics. You can use user timings to test how long your scripts run or how it takes to load them. And if you use Google Tag Manager you can implement the Javascript error listener that tracks unhandled javascript exceptions (i.e. it gives the error message and the offending script and the line in which the error happened).
This provides at least some insight into how your javascript behaves in the wild, but (IMO) it's not actually "profiling".