title: Memory profiler for Google cloud function?
body: <p>I'm running a Google cloud function and getting out-of-memory error:</p>
  
  <p><code>Error: memory limit exceeded. Function invocation was interrupted.
  </code></p>
  
  <p>However, when I profile it locally, it doesn't use more than 500-600Mb (My gcf memory allocation is 2Gb)</p>
  
  <p>Is there a way to have a line-by-line profiler to</p>
  
  <p>a) to see which steps result in highest memory increases, and</p>
  
  <p>b) view current memory usage of the cloud function?</p>