code: function stopCPU(name, format) {
      var cpuprofile = prof2cpuprofile(profiler.stopProfiling(name));
      if (format === 'cpuprofile') {
          return JSON.stringify(cpuprofile);
      } else {
          var outStream = new memstream.WritableStream();
          c2ct.chromeProfileToCallgrind(cpuprofile, outStream);
          return outStream.toString();
      }
  }
docs: End profiling