Python: module telemetry.internal.platform.cros_platform_backend

telemetry.internal.platform.cros_platform_backend | index telemetry/internal/platform/cros_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.cros_device telemetry.internal.forwarders.cros_forwarder telemetry.core.cros_interface | telemetry.internal.platform.power_monitor.cros_power_monitor telemetry.internal.platform.linux_based_platform_backend logging | telemetry.core.platform telemetry.internal.util.ps_util telemetry.core.util |

Classes
`` |  | telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend(telemetry.internal.platform.platform_backend.PlatformBackend) CrosPlatformBackend
class CrosPlatformBackend(telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend)
`` |  | Method resolution order: CrosPlatformBackend telemetry.internal.platform.linux_based_platform_backend.LinuxBasedPlatformBackend telemetry.internal.platform.platform_backend.PlatformBackend __builtin__.object Methods defined here: CanFlushIndividualFilesFromSystemCache(self) CanMonitorPower(self) FlushEntireSystemCache(self) FlushSystemCacheForDirectory(self, directory) GetChildPids(self, pid) `Returns a list of child pids of |pid|.` GetCommandLine(self, pid) GetFileContents(self, filename) GetOSName(self) GetOSVersionName(self) GetPsOutput(self, columns, pid=None) GetRemotePort(self, port) HasBeenThermallyThrottled(self) IsThermallyThrottled(self) PathExists(self, path, timeout=None, retries=None) RunCommand(self, args) StartMonitoringPower(self, browser) StopMonitoringPower(self) __init__(self, device=None) Class methods defined here: CreatePlatformForDevice(cls, device, finder_options) from __builtin__.type IsPlatformBackendForHost(cls) from __builtin__.type SupportsDevice(cls, device) from __builtin__.type Static methods defined here: ParseCStateSample(sample) Data descriptors defined here: cri forwarder_factory 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) Methods inherited from telemetry.internal.platform.platform_backend.PlatformBackend: CanCaptureVideo(self) CanLaunchApplication(self, application) CanMeasurePerApplicationPower(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) GetArchName(self) GetDeviceTypeName(self) GetNetworkData(self, browser) InitPlatformBackend(self) InstallApplication(self, application) IsApplicationRunning(self, application) IsCooperativeShutdownSupported(self) `Indicates whether CooperativelyShutdown, below, is supported. It is not necessary to implement it on all platforms.` IsDisplayTracingSupported(self) LaunchApplication(self, application, parameters=None, elevate_privilege=False) 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.` 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) 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)` 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