meteorhacks / kadira-profiler

CPU Profiling support for Kadira
https://kadira.io/cpu-profiling.html
MIT License
14 stars 15 forks source link

Cannot Run Server-Side Profiler on Meteor 1.2 #3

Closed abernix closed 9 years ago

abernix commented 9 years ago

Looks like Profiler is broken in the latest Meteor. If I run Kadira.profileCpu(10) on the client console, I get the following on the Meteor server since the random package is not use'd in package.js and Random is no longer exported globally by Meteor 1.2. It works fine with that change in there though! Very nice package! :smile:

I20151001-14:13:35.702(3)? Exception while invoking method 'kadira.profileCpu' ReferenceError: Random is not defined
I20151001-14:13:35.702(3)?     at localProfileCPU (meteor://💻app/packages/meteorhacks_kadira-profiler/packages/meteorhacks_kadira-profiler.js:60:1)
I20151001-14:13:35.702(3)?     at [object Object].Meteor.methods.kadira.profileCpu (meteor://💻app/packages/meteorhacks_kadira-profiler/packages/meteorhacks_kadira-profiler.js:18:1)
I20151001-14:13:35.702(3)?     at [object Object].methodMap.(anonymous function) (meteor://💻app/packages/meteorhacks_kadira/packages/meteorhacks_kadira.js:2554:1)
arunoda commented 9 years ago

Okay. Let me try to fix it.

abernix commented 9 years ago

Just tested, it works once again with just a simple api.use("random", "server"); in package.js

arunoda commented 9 years ago

Yep. Fixed and published a new version :) Thanks.

abernix commented 9 years ago

Works great. Thanks! :)