Python: module telemetry.internal.platform.posix_platform_backend

telemetry.internal.platform.posix_platform_backend | index telemetry/internal/platform/posix_platform_backend.py

`# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.`

Modules
`` |  |
telemetry.internal.platform.desktop_platform_backend distutils logging | os telemetry.internal.util.ps_util re | stat subprocess sys |

Classes
`` |  | telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend(telemetry.internal.platform.platform_backend.PlatformBackend) PosixPlatformBackend
class PosixPlatformBackend(telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend)
`` |  | Method resolution order: PosixPlatformBackend telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend telemetry.internal.platform.platform_backend.PlatformBackend __builtin__.object Methods defined here: CanLaunchApplication(self, application) GetChildPids(self, pid) `Returns a list of child pids of |pid|.` GetCommandLine(self, pid) GetFileContents(self, path) GetPsOutput(self, columns, pid=None) `Returns output of the 'ps' command as a list of lines. Subclass should override this function. Args: columns: A list of require columns, e.g., ['pid', 'pss']. pid: If not None, returns only the information of the process with the pid.` IsApplicationRunning(self, application) LaunchApplication(self, application, parameters=None, elevate_privilege=False) RunCommand(self, args) Methods inherited from telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend: FlushSystemCacheForDirectory(self, directory) GetDeviceTypeName(self) Methods inherited from telemetry.internal.platform.platform_backend.PlatformBackend: CanCaptureVideo(self) CanFlushIndividualFilesFromSystemCache(self) CanMeasurePerApplicationPower(self) CanMonitorNetworkData(self) CanMonitorPower(self) CanMonitorThermalThrottling(self) CanTakeScreenshot(self) CooperativelyShutdown(self, proc, app_name) `Cooperatively shut down the given process from subprocess.Popen. Currently this is only implemented on Windows. See crbug.com/424024 for background on why it was added. Args: proc: a process object returned from subprocess.Popen. app_name: on Windows, is the prefix of the application's window class name that should be searched for. This helps ensure that only the application's windows are closed. Returns True if it is believed the attempt succeeded.` DidCreateBrowser(self, browser, browser_backend) DidStartBrowser(self, browser, browser_backend) FlushDnsCache(self) FlushEntireSystemCache(self) GetArchName(self) GetCpuStats(self, pid) GetCpuTimestamp(self) GetMemoryStats(self, pid) GetNetworkData(self, browser) GetOSName(self) GetOSVersionName(self) GetRemotePort(self, port) GetSystemCommitCharge(self) GetSystemTotalPhysicalMemory(self) HasBeenThermallyThrottled(self) InitPlatformBackend(self) InstallApplication(self, application) IsCooperativeShutdownSupported(self) `Indicates whether CooperativelyShutdown, below, is supported. It is not necessary to implement it on all platforms.` IsDisplayTracingSupported(self) IsThermallyThrottled(self) PathExists(self, path, timeout=None, retries=None) `Tests whether the given path exists on the target platform. Args: path: path in request. timeout: timeout. retries: num of retries. Return: Whether the path exists on the target platform.` PurgeUnpinnedMemory(self) ReadMsr(self, msr_number, start=0, length=64) `Read a CPU model-specific register (MSR). Which MSRs are available depends on the CPU model. On systems with multiple CPUs, this function may run on any CPU. Args: msr_number: The number of the register to read. start: The least significant bit to read, zero-indexed. (Said another way, the number of bits to right-shift the MSR value.) length: The number of bits to read. MSRs are 64 bits, even on 32-bit CPUs.` SetFullPerformanceModeEnabled(self, enabled) SetPlatform(self, platform) StartDisplayTracing(self) `Start gathering a trace with frame timestamps close to physical display.` StartMonitoringPower(self, browser) StartVideoCapture(self, min_bitrate_mbps) StopDisplayTracing(self) `Stop gathering a trace with frame timestamps close to physical display. Returns a raw tracing events that contains the timestamps of physical display.` StopMonitoringPower(self) StopVideoCapture(self) TakeScreenshot(self, file_path) WillCloseBrowser(self, browser, browser_backend) __init__(self, device=None) `Initalize an instance of PlatformBackend from a device optionally. Call sites need to use SupportsDevice before intialization to check whether this platform backend supports the device. If device is None, this constructor returns the host platform backend which telemetry is running on. Args: device: an instance of telemetry.core.platform.device.Device.` Class methods inherited from telemetry.internal.platform.platform_backend.PlatformBackend: CreatePlatformForDevice(cls, device, finder_options) from __builtin__.type IsPlatformBackendForHost(cls) from __builtin__.type `Returns whether this platform backend is the platform backend to be used for the host device which telemetry is running on.` SupportsDevice(cls, device) from __builtin__.type `Returns whether this platform backend supports intialization from the device.` Data descriptors inherited from telemetry.internal.platform.platform_backend.PlatformBackend: __dict__ `dictionary for instance variables (if defined)` __weakref__ `list of weak references to the object (if defined)` forwarder_factory is_host_platform is_video_capture_running network_controller_backend platform running_browser_backends tracing_controller_backend wpr_ca_cert_path wpr_http_device_port wpr_https_device_port