title: "profiling" server side Javascript code on Meteor
body: <p>Using WebStorm 2016.1 with Meteor.</p>
  
  <p>Want to be able to “profile” performance of Javascript for Meteor on server.</p>
  
  <p>WebStorm has spy-js which is just what I need ... however have not been able to get it to work with Meteor.
  Cannot run 2 instances (Meteor and spy-js) at same time from one instance of WebStorm.
  Running each on separate WS instances does not work either.
  Start Meteor from terminal ... then Run spy-js from WS ... and then load Meteor prj from within WS (File::OpenURL → localhost:3000) ... has not worked either.</p>
  
  <p>Have looked at Kadira, Chrome DevTools, NodeJS profiling, JS profiling ... but have not seen example of how they could work with server-side JS on Meteor.</p>
  
  <p>I see Kadira has course (BulletProof Meteor) on Nodejs Internals (<a href="https://bulletproofmeteor.com/packages" rel="nofollow">https://bulletproofmeteor.com/packages</a>) ... but course has been postponed (<a href="https://meteorhacks.com/postponing-nodejs-internals-lessons-on-bulletproof-meteor.html" rel="nofollow">https://meteorhacks.com/postponing-nodejs-internals-lessons-on-bulletproof-meteor.html</a>).</p>
  
  <p>Best 2 solutions I have found: </p>
  
  <ol>
  <li><p>Make CALL from client to server ... and profile function that does CALL on client side in order to get idea of server performance.</p></li>
  <li><p>Use console.time() and console.timeEnd() functions on server JS code.</p></li>
  </ol>
  
  <p>I think I am missing something obvious ... any suggestions?</p>