@platformatic/watt-extra 1.4.0-alpha.0 → 1.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/plugins/flamegraphs.js
CHANGED
|
@@ -105,7 +105,7 @@ async function flamegraphs (app, _opts) {
|
|
|
105
105
|
|
|
106
106
|
const uploadPromises = serviceIds.map(async (serviceId) => {
|
|
107
107
|
try {
|
|
108
|
-
const profile = await runtime.sendCommandToApplication(serviceId, 'getLastProfile')
|
|
108
|
+
const profile = await runtime.sendCommandToApplication(serviceId, 'getLastProfile', { type: profileType })
|
|
109
109
|
if (!profile || !(profile instanceof Uint8Array)) {
|
|
110
110
|
app.log.error({ serviceId }, 'Failed to get profile from service')
|
|
111
111
|
return
|
|
@@ -286,8 +286,12 @@ test('should handle trigger-heapprofile command and upload heap profiles from se
|
|
|
286
286
|
|
|
287
287
|
app.watt.runtime.sendCommandToApplication = async (
|
|
288
288
|
serviceId,
|
|
289
|
-
command
|
|
289
|
+
command,
|
|
290
|
+
options
|
|
290
291
|
) => {
|
|
292
|
+
if (options && options.type) {
|
|
293
|
+
equal(options.type, 'heap')
|
|
294
|
+
}
|
|
291
295
|
if (command === 'startProfiling') {
|
|
292
296
|
return { success: true }
|
|
293
297
|
}
|