Python: module telemetry.internal.platform.linux_platform_backend

telemetry.internal.platform.linux_platform_backend | index telemetry/internal/platform/linux_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.util.binary_manager catapult_base.cloud_storage telemetry.decorators telemetry.internal.platform.linux_based_platform_backend | logging telemetry.internal.platform.power_monitor.msr_power_monitor os telemetry.core.os_version | platform telemetry.internal.platform.posix_platform_backend subprocess sys | telemetry.core.util

Classes
`` |  | telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend(telemetry.internal.platform.platform_backend.PlatformBackend) LinuxPlatformBackend(telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend, telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend) telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend(telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend) LinuxPlatformBackend(telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend, telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend)
class LinuxPlatformBackend(telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend, telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend)
`` |  | Method resolution order: LinuxPlatformBackend telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend telemetry.internal.platform.desktop_platform_backend.DesktopPlatformBackend telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend telemetry.internal.platform.platform_backend.PlatformBackend __builtin__.object Methods defined here: CanFlushIndividualFilesFromSystemCache(self) CanLaunchApplication(self, application) CanMeasurePerApplicationPower(self) CanMonitorPower(self) FlushEntireSystemCache(self) GetArchName(*args, **kwargs) GetOSName(self) GetOSVersionName(*args, **kwargs) HasBeenThermallyThrottled(self) InstallApplication(self, application) IsThermallyThrottled(self) ReadMsr(self, msr_number, start=0, length=64) StartMonitoringPower(self, browser) StopMonitoringPower(self) __init__(self) Class methods defined here: IsPlatformBackendForHost(cls) from __builtin__.type Methods inherited from telemetry.internal.platform.posix_platform_backend.PosixPlatformBackend: 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.linux_based_platform_backend.LinuxBasedPlatformBackend: GetClockTicks(*args, **kwargs) `Returns the number of clock ticks per second. The proper way is to call os.sysconf('SC_CLK_TCK') but that is not easy to do on Android/CrOS. In practice, nearly all Linux machines have a USER_HZ of 100, so just return that.` GetCpuStats(self, pid) GetCpuTimestamp(self) GetMemoryStats(self, pid) GetSystemCommitCharge(self) `# Get the commit charge in kB.` GetSystemTotalPhysicalMemory(*args, **kwargs) Static methods inherited from telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend: ParseCStateSample(sample) `Parse a single c-state residency sample. Args: sample: A sample of c-state residency times to be parsed. Organized as a dictionary mapping CPU name to a string containing all c-state names, the times in each state, the latency of each state, and the time at which the sample was taken all separated by newlines. Ex: {'cpu0': 'C0 C1 5000 2000 20 30 1406673171'} Returns: Dictionary associating a c-state with a time.` Methods inherited from telemetry.internal.platform.platform_backend.PlatformBackend: CanCaptureVideo(self) CanMonitorNetworkData(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) GetNetworkData(self, browser) GetRemotePort(self, port) InitPlatformBackend(self) IsCooperativeShutdownSupported(self) `Indicates whether CooperativelyShutdown, below, is supported. It is not necessary to implement it on all platforms.` IsDisplayTracingSupported(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) SetFullPerformanceModeEnabled(self, enabled) SetPlatform(self, platform) StartDisplayTracing(self) `Start gathering a trace with frame timestamps close to physical display.` 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.` StopVideoCapture(self) TakeScreenshot(self, file_path) WillCloseBrowser(self, browser, browser_backend) Class methods inherited from telemetry.internal.platform.platform_backend.PlatformBackend: CreatePlatformForDevice(cls, device, finder_options) from __builtin__.type 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