mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
Try to address WPT running OOM
- Continue to reuse the Browser/Env/Isolate, but no start a new session per test. - Test http server now properly closes the sendFile fd - Run WPT in ReleaseMode - Add --quiet option to WPT and some commented out debug code for dumping v8 memory stats
This commit is contained in:
@@ -329,6 +329,27 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
self.isolate.lowMemoryNotification();
|
||||
}
|
||||
|
||||
pub fn dumpMemoryStats(self: *Self) void {
|
||||
const stats = self.isolate.getHeapStatistics();
|
||||
std.debug.print(
|
||||
\\ Total Heap Size: {d}
|
||||
\\ Total Heap Size Executable: {d}
|
||||
\\ Total Physical Size: {d}
|
||||
\\ Total Available Size: {d}
|
||||
\\ Used Heap Size: {d}
|
||||
\\ Heap Size Limit: {d}
|
||||
\\ Malloced Memory: {d}
|
||||
\\ External Memory: {d}
|
||||
\\ Peak Malloced Memory: {d}
|
||||
\\ Number Of Native Contexts: {d}
|
||||
\\ Number Of Detached Contexts: {d}
|
||||
\\ Total Global Handles Size: {d}
|
||||
\\ Used Global Handles Size: {d}
|
||||
\\ Zap Garbage: {any}
|
||||
\\
|
||||
, .{stats.total_heap_size, stats.total_heap_size_executable, stats.total_physical_size, stats.total_available_size, stats.used_heap_size, stats.heap_size_limit, stats.malloced_memory, stats.external_memory, stats.peak_malloced_memory, stats.number_of_native_contexts, stats.number_of_detached_contexts, stats.total_global_handles_size, stats.used_global_handles_size, stats.does_zap_garbage});
|
||||
}
|
||||
|
||||
fn promiseRejectCallback(v8_msg: v8.C_PromiseRejectMessage) callconv(.c) void {
|
||||
const msg = v8.PromiseRejectMessage.initFromC(v8_msg);
|
||||
const isolate = msg.getPromise().toObject().getIsolate();
|
||||
|
||||
Reference in New Issue
Block a user