keymetrics / pm2-io-apm

PM2.io APM for Node.JS
Apache License 2.0
148 stars 40 forks source link

Send acknowledgments when Mem/CPU profiling is finished #37

Closed Unitech closed 6 years ago

Unitech commented 6 years ago

E.G.: https://github.com/keymetrics/pmx-2/blob/master/src/profiling/profilingCPU.ts#L50

Send a message like:

   this.transport.send({
      type : 'profiling:cpu:finished',
      data : {
           filesize : '20mb'
      }
    }, false)
wallet77 commented 6 years ago

If multiple profiling are launched, do we need an unique id ? Action "km:cpu:profiling:start" can return an id and each response should attach this identifier in response's body.

vmarchaud commented 6 years ago

Indeed ! We should just add a unique_id field with an UUID.

Unitech commented 6 years ago

Great addin

wallet77 commented 6 years ago

Done : https://github.com/keymetrics/pmx-2/pull/45