inline profiling for js
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


jsInstrument allows you to measure performance of arbitrary chunks of application code.

After including the jsInstrument script in your application <script src="instrument.js"></script>

you can use the the start and stop methods to wrap pieces of code you'd like to measure. start and stop take a descriptive label for the block of code you are measuring as an argument.

// some code I'm curious about
var str = '';
for (var i = 0; i < 1000; i++) {
  str += '*'; 

jsInstrument is disabled by default. To enable tracking use:


to display the current stats summary run:


This will open the console in a new window. Stats are reset after each page refresh; however, the console will retain the captured summary data. Call loadConsole after each page refresh to start logging summary data to the console again.

You can save a run for comparision by pressing the snapshot button in the console window.