CDPotion.Domain.Memory (cdpotion v0.1.4)
Summary
Types
Executable module information
Memory pressure level.
Array of heap profile samples.
Heap profile sample.
Functions
Simulate OomIntervention by purging V8 memory.
Retrieve native memory allocations profile collected since renderer process startup.
Retrieve native memory allocations profile collected since browser process startup.
Retrieve native memory allocations profile collected since last
startSampling
call.
Enable/disable suppressing memory pressure notifications in all processes.
Simulate a memory pressure notification in all processes.
Start collecting native memory profile.
Stop collecting native memory profile.
Types
module_info()
@type module_info() :: %{ baseAddress: String.t(), name: String.t(), size: number(), uuid: String.t() }
Executable module information
pressure_level()
@type pressure_level() :: :moderate | :critical
Memory pressure level.
sampling_profile()
@type sampling_profile() :: %{ modules: [module_info()], samples: [sampling_profile_node()] }
Array of heap profile samples.
sampling_profile_node()
Heap profile sample.
Functions
forcibly_purge_java_script_memory()
Simulate OomIntervention by purging V8 memory.
get_all_time_sampling_profile()
Retrieve native memory allocations profile collected since renderer process startup.
get_browser_sampling_profile()
Retrieve native memory allocations profile collected since browser process startup.
get_dom_counters()
get_sampling_profile()
Retrieve native memory allocations profile collected since last
startSampling
call.
prepare_for_leak_detection()
set_pressure_notifications_suppressed(suppressed)
Enable/disable suppressing memory pressure notifications in all processes.
Parameters:
- (Required)
suppressed
: If true, memory pressure notifications will be suppressed.
simulate_pressure_notification(level)
@spec simulate_pressure_notification(pressure_level()) :: {String.t(), map()}
Simulate a memory pressure notification in all processes.
Parameters:
- (Required)
level
: Memory pressure level of the notification.
start_sampling(sampling_interval \\ nil, suppress_randomness \\ nil)
Start collecting native memory profile.
Parameters:
- (Optional)
sampling_interval
: Average number of bytes between samples. - (Optional)
suppress_randomness
: Do not randomize intervals between samples.
stop_sampling()
Stop collecting native memory profile.