Alias / Command shortcut on Meteor Shell for performance debug

So, I’ve been learning meteor lately and to test some functions execution and optimize my app, I’m using some basic javascript timing functions on the meteor shell, such as:


Works pretty well… now I’m wondering if I can wrap this into a single command on the meteor shell something like:

performance somefunction();

Not something really important, just wondering what can I do with the framework to optimize my workflow.

You could create a global server only utilities object, then reference it from the console. Something like:


ConsoleUtils = {
  timing(someFunction) {
    const timingLabel = `${} timing`;

You could then call it from the console like: