Skip to content

Conversation

nyannyacha
Copy link
Contributor

@nyannyacha nyannyacha commented Jun 13, 2024

What kind of change does this PR introduce?

Enhancement

Description

This PR changes the original v8 memory statistics that were the basis of the memory limitation to be exposed, rather than the arbitrarily calculated memory usage by MemCheck (Previously MemCheckState).

{
  timestamp: "2024-06-14T00:35:08.578Z",
  event_type: "Shutdown",
  event: [Object: null prototype] {
    reason: [Object: null prototype] {
      Memory: [Object: null prototype] { limited_by: "mem_check" }
    },
    cpu_time_used: 74,
    memory_used: [Object: null prototype] {
      total: 67685841,
      heap: 6460736,
      external: 61225105,
      mem_check_captured: [Object: null prototype] {
        current: [Object: null prototype] {
          totalHeapSize: 8626176,
          totalHeapSizeExecutable: 262144,
          totalPhysicalSize: 7131136,
          totalAvailableSize: 61063776,
          totalGlobalHandlesSize: 24576,
          usedGlobalHandlesSize: 18976,
          usedHeapSize: 6460736,
          mallocedMemory: 6460736,
          externalMemory: 61225105,
          peakMallocedMemory: 139480
        },
        exceeded: true
      }
    }
  },
  metadata: [Object: null prototype] {
    service_path: "./examples/serve",
    execution_id: "b033df22-46d2-41cf-990d-ba9389141780"
  }
}

@nyannyacha nyannyacha force-pushed the fix-add-malloced-metric branch from 4616337 to 139435b Compare June 13, 2024 23:53
@nyannyacha nyannyacha marked this pull request as ready for review June 14, 2024 00:04
@nyannyacha nyannyacha requested a review from laktek June 14, 2024 02:21
@nyannyacha nyannyacha merged commit ac6a0a4 into supabase:main Jun 14, 2024
@nyannyacha nyannyacha deleted the fix-add-malloced-metric branch June 14, 2024 05:00
Copy link

🎉 This PR is included in version 1.54.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants