Skip to main content

cdp_driver/methods/
memory.rs

1// @generated by `just generate-methods` from protocol/*.json.
2// Do not edit by hand; edit xtask/ and regenerate.
3
4//! The `Memory` domain.
5//!
6//! Method names for the `Memory` domain, for use with
7//! [`CdpClient::call`](crate::CdpClient::call).
8//!
9//! This domain is experimental and may change without notice.
10
11/// Retruns current DOM object counters.
12///
13/// Returns: `documents`, `nodes`, `jsEventListeners`
14pub const GET_DOM_COUNTERS: &str = "Memory.getDOMCounters";
15
16/// Retruns DOM object counters after preparing renderer for leak detection.
17///
18/// Returns: `counters`
19pub const GET_DOM_COUNTERS_FOR_LEAK_DETECTION: &str = "Memory.getDOMCountersForLeakDetection";
20
21/// Prepares for leak detection by terminating workers, stopping
22/// spellcheckers, dropping non-essential internal caches, running garbage
23/// collections, etc.
24pub const PREPARE_FOR_LEAK_DETECTION: &str = "Memory.prepareForLeakDetection";
25
26/// Simulate OomIntervention by purging V8 memory.
27pub const FORCIBLY_PURGE_JAVA_SCRIPT_MEMORY: &str = "Memory.forciblyPurgeJavaScriptMemory";
28
29/// Enable/disable suppressing memory pressure notifications in all processes.
30///
31/// Parameters:
32/// - `suppressed`: boolean
33pub const SET_PRESSURE_NOTIFICATIONS_SUPPRESSED: &str = "Memory.setPressureNotificationsSuppressed";
34
35/// Simulate a memory pressure notification in all processes.
36///
37/// Parameters:
38/// - `level`: PressureLevel
39pub const SIMULATE_PRESSURE_NOTIFICATION: &str = "Memory.simulatePressureNotification";
40
41/// Start collecting native memory profile.
42///
43/// Parameters:
44/// - `samplingInterval`: integer (optional)
45/// - `suppressRandomness`: boolean (optional)
46pub const START_SAMPLING: &str = "Memory.startSampling";
47
48/// Stop collecting native memory profile.
49pub const STOP_SAMPLING: &str = "Memory.stopSampling";
50
51/// Retrieve native memory allocations profile collected since renderer
52/// process startup.
53///
54/// Returns: `profile`
55pub const GET_ALL_TIME_SAMPLING_PROFILE: &str = "Memory.getAllTimeSamplingProfile";
56
57/// Retrieve native memory allocations profile collected since browser process
58/// startup.
59///
60/// Returns: `profile`
61pub const GET_BROWSER_SAMPLING_PROFILE: &str = "Memory.getBrowserSamplingProfile";
62
63/// Retrieve native memory allocations profile collected since last
64/// `startSampling` call.
65///
66/// Returns: `profile`
67pub const GET_SAMPLING_PROFILE: &str = "Memory.getSamplingProfile";