Class: Selenium::DevTools::V124::Memory
- Inherits:
- 
      Object
      
        - Object
- Selenium::DevTools::V124::Memory
 
- Defined in:
- lib/selenium/devtools/v124/memory.rb
Instance Method Summary collapse
- #forcibly_purge_javascript_memory ⇒ Object
- #get_all_time_sampling_profile ⇒ Object
- #get_browser_sampling_profile ⇒ Object
- #get_dom_counters ⇒ Object
- #get_sampling_profile ⇒ Object
- 
  
    
      #initialize(devtools)  ⇒ Memory 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of Memory. 
- #on(event, &block) ⇒ Object
- #prepare_for_leak_detection ⇒ Object
- #set_pressure_notifications_suppressed(suppressed:) ⇒ Object
- #simulate_pressure_notification(level:) ⇒ Object
- #start_sampling(sampling_interval: nil, suppress_randomness: nil) ⇒ Object
- #stop_sampling ⇒ Object
Constructor Details
#initialize(devtools) ⇒ Memory
Returns a new instance of Memory.
| 26 27 28 | # File 'lib/selenium/devtools/v124/memory.rb', line 26 def initialize(devtools) @devtools = devtools end | 
Instance Method Details
#forcibly_purge_javascript_memory ⇒ Object
| 43 44 45 | # File 'lib/selenium/devtools/v124/memory.rb', line 43 def forcibly_purge_javascript_memory @devtools.send_cmd('Memory.forciblyPurgeJavaScriptMemory') end | 
#get_all_time_sampling_profile ⇒ Object
| 67 68 69 | # File 'lib/selenium/devtools/v124/memory.rb', line 67 def get_all_time_sampling_profile @devtools.send_cmd('Memory.getAllTimeSamplingProfile') end | 
#get_browser_sampling_profile ⇒ Object
| 71 72 73 | # File 'lib/selenium/devtools/v124/memory.rb', line 71 def get_browser_sampling_profile @devtools.send_cmd('Memory.getBrowserSamplingProfile') end | 
#get_dom_counters ⇒ Object
| 35 36 37 | # File 'lib/selenium/devtools/v124/memory.rb', line 35 def get_dom_counters @devtools.send_cmd('Memory.getDOMCounters') end | 
#get_sampling_profile ⇒ Object
| 75 76 77 | # File 'lib/selenium/devtools/v124/memory.rb', line 75 def get_sampling_profile @devtools.send_cmd('Memory.getSamplingProfile') end | 
#on(event, &block) ⇒ Object
| 30 31 32 33 | # File 'lib/selenium/devtools/v124/memory.rb', line 30 def on(event, &block) event = EVENTS[event] if event.is_a?(Symbol) @devtools.callbacks["Memory.#{event}"] << block end | 
#prepare_for_leak_detection ⇒ Object
| 39 40 41 | # File 'lib/selenium/devtools/v124/memory.rb', line 39 def prepare_for_leak_detection @devtools.send_cmd('Memory.prepareForLeakDetection') end | 
#set_pressure_notifications_suppressed(suppressed:) ⇒ Object
| 47 48 49 50 | # File 'lib/selenium/devtools/v124/memory.rb', line 47 def set_pressure_notifications_suppressed(suppressed:) @devtools.send_cmd('Memory.setPressureNotificationsSuppressed', suppressed: suppressed) end | 
#simulate_pressure_notification(level:) ⇒ Object
| 52 53 54 55 | # File 'lib/selenium/devtools/v124/memory.rb', line 52 def simulate_pressure_notification(level:) @devtools.send_cmd('Memory.simulatePressureNotification', level: level) end | 
#start_sampling(sampling_interval: nil, suppress_randomness: nil) ⇒ Object
| 57 58 59 60 61 | # File 'lib/selenium/devtools/v124/memory.rb', line 57 def start_sampling(sampling_interval: nil, suppress_randomness: nil) @devtools.send_cmd('Memory.startSampling', samplingInterval: sampling_interval, suppressRandomness: suppress_randomness) end | 
#stop_sampling ⇒ Object
| 63 64 65 | # File 'lib/selenium/devtools/v124/memory.rb', line 63 def stop_sampling @devtools.send_cmd('Memory.stopSampling') end |