示例#1
0
module.exports.patterns = function(opts, callback) {
  var spinner = spin();
  profiler.journey(opts, function(err, data) {
    spinner.remove();
    callback(err, data);
  });
};
示例#2
0
module.exports.profile = function(query, callback) {
  debug('--> profiling %s', JSON.stringify(query));
  var spinner = spin();
  profiler.profile(query, function(err, data) {
    if (!data) {
      data = {
        options: []
      };
    }

    debug('<-- profiled %s options', data.options.length);
    spinner.remove();
    callback(err, process(data));
  });
};