new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Electron · Tutorial · all subjects

performance optimization

6 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

process.getCPUUsage returns CPU usage data

process.getCPUUsage() returns a CPUUsage structure containing CPU usage information for the current process.

process.takeHeapSnapshot creates V8 snapshot

process.takeHeapSnapshot(filePath) takes a V8 heap snapshot and saves it to the specified file path. It returns a boolean indicating whether the snapshot was created successfully.

process.getHeapStatistics returns V8 heap data

process.getHeapStatistics() returns an object with V8 heap statistics reported in Kilobytes. The object contains: totalHeapSize (Integer), totalHeapSizeExecutable (Integer), totalPhysicalSize (Integer), totalAvailableSize (Integer), usedHeapSize (Integer), heapSizeLimit (Integer), mallocedMemory (Integer), peakMallocedMemory (Integer), and doesZapGarbage (boolean).

process.getBlinkMemoryInfo returns rendering memory

process.getBlinkMemoryInfo() returns an object with Blink memory information in Kilobytes: allocated (size of all allocated objects) and total (total allocated space). It can be useful for debugging rendering and DOM related memory issues.

process.getProcessMemoryInfo returns promise with memory stats

process.getProcessMemoryInfo() returns a Promise that resolves with a ProcessMemoryInfo object containing memory usage statistics about the current process in Kilobytes. This API should be called after app ready. On macOS, Chromium does not provide residentSet value because macOS performs in-memory compression; private memory is more representative of actual pre-compression memory usage on macOS.

process.getSystemMemoryInfo returns system-wide memory stats

process.getSystemMemoryInfo() returns an object with system-wide memory statistics in Kilobytes: total (total physical memory available), free (memory not used by applications or disk cache), available (Linux only, kernel estimate for allocation without swapping), fileBacked (macOS only, memory paged to storage), purgeable (macOS only, memory marked as reclaimable), swapTotal (Windows/Linux only, total swap memory), and swapFree (Windows/Linux only, free swap memory).

Give your agent this brain