OLD | NEW |
| (Empty) |
1 | |
2 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> | |
3 <html><head><title>Python: module telemetry.internal.platform.posix_platform_bac
kend</title> | |
4 <meta charset="utf-8"> | |
5 </head><body bgcolor="#f0f0f8"> | |
6 | |
7 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> | |
8 <tr bgcolor="#7799ee"> | |
9 <td valign=bottom> <br> | |
10 <font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a hre
f="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry
.internal.html"><font color="#ffffff">internal</font></a>.<a href="telemetry.int
ernal.platform.html"><font color="#ffffff">platform</font></a>.posix_platform_ba
ckend</strong></big></big></font></td | |
11 ><td align=right valign=bottom | |
12 ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href=
"../telemetry/internal/platform/posix_platform_backend.py">telemetry/internal/pl
atform/posix_platform_backend.py</a></font></td></tr></table> | |
13 <p><tt># Copyright 2013 The Chromium Authors.
All rights reserved.<br> | |
14 # Use of this source code is governed by
a BSD-style license that can be<br> | |
15 # found in the LICENSE file.</tt></p> | |
16 <p> | |
17 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
18 <tr bgcolor="#aa55cc"> | |
19 <td colspan=3 valign=bottom> <br> | |
20 <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big
></font></td></tr> | |
21 | |
22 <tr><td bgcolor="#aa55cc"><tt> </tt></td><td>
</td> | |
23 <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=t
op><a href="telemetry.internal.platform.desktop_platform_backend.html">telemetry
.internal.platform.desktop_platform_backend</a><br> | |
24 <a href="distutils.html">distutils</a><br> | |
25 <a href="logging.html">logging</a><br> | |
26 </td><td width="25%" valign=top><a href="os.html">os</a><br> | |
27 <a href="telemetry.internal.util.ps_util.html">telemetry.internal.util.ps_util</
a><br> | |
28 <a href="re.html">re</a><br> | |
29 </td><td width="25%" valign=top><a href="stat.html">stat</a><br> | |
30 <a href="subprocess.html">subprocess</a><br> | |
31 <a href="sys.html">sys</a><br> | |
32 </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> | |
33 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
34 <tr bgcolor="#ee77aa"> | |
35 <td colspan=3 valign=bottom> <br> | |
36 <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big
></font></td></tr> | |
37 | |
38 <tr><td bgcolor="#ee77aa"><tt> </tt></td><td>
</td> | |
39 <td width="100%"><dl> | |
40 <dt><font face="helvetica, arial"><a href="telemetry.internal.platform.desktop_p
latform_backend.html#DesktopPlatformBackend">telemetry.internal.platform.desktop
_platform_backend.DesktopPlatformBackend</a>(<a href="telemetry.internal.platfor
m.platform_backend.html#PlatformBackend">telemetry.internal.platform.platform_ba
ckend.PlatformBackend</a>) | |
41 </font></dt><dd> | |
42 <dl> | |
43 <dt><font face="helvetica, arial"><a href="telemetry.internal.platform.posix_pla
tform_backend.html#PosixPlatformBackend">PosixPlatformBackend</a> | |
44 </font></dt></dl> | |
45 </dd> | |
46 </dl> | |
47 <p> | |
48 <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> | |
49 <tr bgcolor="#ffc8d8"> | |
50 <td colspan=3 valign=bottom> <br> | |
51 <font color="#000000" face="helvetica, arial"><a name="PosixPlatformBackend">cla
ss <strong>PosixPlatformBackend</strong></a>(<a href="telemetry.internal.platfor
m.desktop_platform_backend.html#DesktopPlatformBackend">telemetry.internal.platf
orm.desktop_platform_backend.DesktopPlatformBackend</a>)</font></td></tr> | |
52 | |
53 <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> | |
54 <td width="100%"><dl><dt>Method resolution order:</dt> | |
55 <dd><a href="telemetry.internal.platform.posix_platform_backend.html#PosixPlatfo
rmBackend">PosixPlatformBackend</a></dd> | |
56 <dd><a href="telemetry.internal.platform.desktop_platform_backend.html#DesktopPl
atformBackend">telemetry.internal.platform.desktop_platform_backend.DesktopPlatf
ormBackend</a></dd> | |
57 <dd><a href="telemetry.internal.platform.platform_backend.html#PlatformBackend">
telemetry.internal.platform.platform_backend.PlatformBackend</a></dd> | |
58 <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> | |
59 </dl> | |
60 <hr> | |
61 Methods defined here:<br> | |
62 <dl><dt><a name="PosixPlatformBackend-CanLaunchApplication"><strong>CanLaunchApp
lication</strong></a>(self, application)</dt></dl> | |
63 | |
64 <dl><dt><a name="PosixPlatformBackend-GetChildPids"><strong>GetChildPids</strong
></a>(self, pid)</dt><dd><tt>Returns a list of child pi
ds of |pid|.</tt></dd></dl> | |
65 | |
66 <dl><dt><a name="PosixPlatformBackend-GetCommandLine"><strong>GetCommandLine</st
rong></a>(self, pid)</dt></dl> | |
67 | |
68 <dl><dt><a name="PosixPlatformBackend-GetFileContents"><strong>GetFileContents</
strong></a>(self, path)</dt></dl> | |
69 | |
70 <dl><dt><a name="PosixPlatformBackend-GetPsOutput"><strong>GetPsOutput</strong><
/a>(self, columns, pid<font color="#909090">=None</font>)</dt><dd><tt>Returns&nb
sp;output of the 'ps' command as a list
of lines.<br> | |
71 Subclass should override this function.<br> | |
72 <br> | |
73 Args:<br> | |
74 columns: A list of require columns, e.
g., ['pid', 'pss'].<br> | |
75 pid: If not None, returns only the&nbs
p;information of the process<br> | |
76 with the pid.</tt></dd></dl> | |
77 | |
78 <dl><dt><a name="PosixPlatformBackend-IsApplicationRunning"><strong>IsApplicatio
nRunning</strong></a>(self, application)</dt></dl> | |
79 | |
80 <dl><dt><a name="PosixPlatformBackend-LaunchApplication"><strong>LaunchApplicati
on</strong></a>(self, application, parameters<font color="#909090">=None</font>,
elevate_privilege<font color="#909090">=False</font>)</dt></dl> | |
81 | |
82 <dl><dt><a name="PosixPlatformBackend-RunCommand"><strong>RunCommand</strong></a
>(self, args)</dt></dl> | |
83 | |
84 <hr> | |
85 Methods inherited from <a href="telemetry.internal.platform.desktop_platform_bac
kend.html#DesktopPlatformBackend">telemetry.internal.platform.desktop_platform_b
ackend.DesktopPlatformBackend</a>:<br> | |
86 <dl><dt><a name="PosixPlatformBackend-FlushSystemCacheForDirectory"><strong>Flus
hSystemCacheForDirectory</strong></a>(self, directory)</dt></dl> | |
87 | |
88 <dl><dt><a name="PosixPlatformBackend-GetDeviceTypeName"><strong>GetDeviceTypeNa
me</strong></a>(self)</dt></dl> | |
89 | |
90 <hr> | |
91 Methods inherited from <a href="telemetry.internal.platform.platform_backend.htm
l#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBackend<
/a>:<br> | |
92 <dl><dt><a name="PosixPlatformBackend-CanCaptureVideo"><strong>CanCaptureVideo</
strong></a>(self)</dt></dl> | |
93 | |
94 <dl><dt><a name="PosixPlatformBackend-CanFlushIndividualFilesFromSystemCache"><s
trong>CanFlushIndividualFilesFromSystemCache</strong></a>(self)</dt></dl> | |
95 | |
96 <dl><dt><a name="PosixPlatformBackend-CanMeasurePerApplicationPower"><strong>Can
MeasurePerApplicationPower</strong></a>(self)</dt></dl> | |
97 | |
98 <dl><dt><a name="PosixPlatformBackend-CanMonitorNetworkData"><strong>CanMonitorN
etworkData</strong></a>(self)</dt></dl> | |
99 | |
100 <dl><dt><a name="PosixPlatformBackend-CanMonitorPower"><strong>CanMonitorPower</
strong></a>(self)</dt></dl> | |
101 | |
102 <dl><dt><a name="PosixPlatformBackend-CanMonitorThermalThrottling"><strong>CanMo
nitorThermalThrottling</strong></a>(self)</dt></dl> | |
103 | |
104 <dl><dt><a name="PosixPlatformBackend-CanTakeScreenshot"><strong>CanTakeScreensh
ot</strong></a>(self)</dt></dl> | |
105 | |
106 <dl><dt><a name="PosixPlatformBackend-CooperativelyShutdown"><strong>Cooperative
lyShutdown</strong></a>(self, proc, app_name)</dt><dd><tt>Cooperatively shu
t down the given process from subprocess.Popen.<br
> | |
107 <br> | |
108 Currently this is only implemented on Windows.&nbs
p;See<br> | |
109 crbug.com/424024 for background on why it was 
;added.<br> | |
110 <br> | |
111 Args:<br> | |
112 proc: a process object returned from s
ubprocess.Popen.<br> | |
113 app_name: on Windows, is the prefix of
the application's window<br> | |
114 class name that should b
e searched for. This helps ensure<br> | |
115 that only the application's&n
bsp;windows are closed.<br> | |
116 <br> | |
117 Returns True if it is believed the attempt&nb
sp;succeeded.</tt></dd></dl> | |
118 | |
119 <dl><dt><a name="PosixPlatformBackend-DidCreateBrowser"><strong>DidCreateBrowser
</strong></a>(self, browser, browser_backend)</dt></dl> | |
120 | |
121 <dl><dt><a name="PosixPlatformBackend-DidStartBrowser"><strong>DidStartBrowser</
strong></a>(self, browser, browser_backend)</dt></dl> | |
122 | |
123 <dl><dt><a name="PosixPlatformBackend-FlushDnsCache"><strong>FlushDnsCache</stro
ng></a>(self)</dt></dl> | |
124 | |
125 <dl><dt><a name="PosixPlatformBackend-FlushEntireSystemCache"><strong>FlushEntir
eSystemCache</strong></a>(self)</dt></dl> | |
126 | |
127 <dl><dt><a name="PosixPlatformBackend-GetArchName"><strong>GetArchName</strong><
/a>(self)</dt></dl> | |
128 | |
129 <dl><dt><a name="PosixPlatformBackend-GetCpuStats"><strong>GetCpuStats</strong><
/a>(self, pid)</dt></dl> | |
130 | |
131 <dl><dt><a name="PosixPlatformBackend-GetCpuTimestamp"><strong>GetCpuTimestamp</
strong></a>(self)</dt></dl> | |
132 | |
133 <dl><dt><a name="PosixPlatformBackend-GetMemoryStats"><strong>GetMemoryStats</st
rong></a>(self, pid)</dt></dl> | |
134 | |
135 <dl><dt><a name="PosixPlatformBackend-GetNetworkData"><strong>GetNetworkData</st
rong></a>(self, browser)</dt></dl> | |
136 | |
137 <dl><dt><a name="PosixPlatformBackend-GetOSName"><strong>GetOSName</strong></a>(
self)</dt></dl> | |
138 | |
139 <dl><dt><a name="PosixPlatformBackend-GetOSVersionName"><strong>GetOSVersionName
</strong></a>(self)</dt></dl> | |
140 | |
141 <dl><dt><a name="PosixPlatformBackend-GetRemotePort"><strong>GetRemotePort</stro
ng></a>(self, port)</dt></dl> | |
142 | |
143 <dl><dt><a name="PosixPlatformBackend-GetSystemCommitCharge"><strong>GetSystemCo
mmitCharge</strong></a>(self)</dt></dl> | |
144 | |
145 <dl><dt><a name="PosixPlatformBackend-GetSystemTotalPhysicalMemory"><strong>GetS
ystemTotalPhysicalMemory</strong></a>(self)</dt></dl> | |
146 | |
147 <dl><dt><a name="PosixPlatformBackend-HasBeenThermallyThrottled"><strong>HasBeen
ThermallyThrottled</strong></a>(self)</dt></dl> | |
148 | |
149 <dl><dt><a name="PosixPlatformBackend-InitPlatformBackend"><strong>InitPlatformB
ackend</strong></a>(self)</dt></dl> | |
150 | |
151 <dl><dt><a name="PosixPlatformBackend-InstallApplication"><strong>InstallApplica
tion</strong></a>(self, application)</dt></dl> | |
152 | |
153 <dl><dt><a name="PosixPlatformBackend-IsCooperativeShutdownSupported"><strong>Is
CooperativeShutdownSupported</strong></a>(self)</dt><dd><tt>Indicates wheth
er CooperativelyShutdown, below, is supported.<br> | |
154 It is not necessary to implement it on a
ll platforms.</tt></dd></dl> | |
155 | |
156 <dl><dt><a name="PosixPlatformBackend-IsDisplayTracingSupported"><strong>IsDispl
ayTracingSupported</strong></a>(self)</dt></dl> | |
157 | |
158 <dl><dt><a name="PosixPlatformBackend-IsThermallyThrottled"><strong>IsThermallyT
hrottled</strong></a>(self)</dt></dl> | |
159 | |
160 <dl><dt><a name="PosixPlatformBackend-PathExists"><strong>PathExists</strong></a
>(self, path, timeout<font color="#909090">=None</font>, retries<font color="#90
9090">=None</font>)</dt><dd><tt>Tests whether the given path
exists on the target platform.<br> | |
161 Args:<br> | |
162 path: path in request.<br> | |
163 timeout: timeout.<br> | |
164 retries: num of retries.<br> | |
165 Return:<br> | |
166 Whether the path exists on the target&
nbsp;platform.</tt></dd></dl> | |
167 | |
168 <dl><dt><a name="PosixPlatformBackend-PurgeUnpinnedMemory"><strong>PurgeUnpinned
Memory</strong></a>(self)</dt></dl> | |
169 | |
170 <dl><dt><a name="PosixPlatformBackend-ReadMsr"><strong>ReadMsr</strong></a>(self
, msr_number, start<font color="#909090">=0</font>, length<font color="#909090">
=64</font>)</dt><dd><tt>Read a CPU model-specific register&n
bsp;(MSR).<br> | |
171 <br> | |
172 Which MSRs are available depends on the CPU&n
bsp;model.<br> | |
173 On systems with multiple CPUs, this function
may run on any CPU.<br> | |
174 <br> | |
175 Args:<br> | |
176 msr_number: The number of the register 
;to read.<br> | |
177 start: The least significant bit to re
ad, zero-indexed.<br> | |
178 (Said another way, the n
umber of bits to right-shift the MSR value.)<
br> | |
179 length: The number of bits to read.&nb
sp;MSRs are 64 bits, even on 32-bit CPUs.</tt
></dd></dl> | |
180 | |
181 <dl><dt><a name="PosixPlatformBackend-SetFullPerformanceModeEnabled"><strong>Set
FullPerformanceModeEnabled</strong></a>(self, enabled)</dt></dl> | |
182 | |
183 <dl><dt><a name="PosixPlatformBackend-SetPlatform"><strong>SetPlatform</strong><
/a>(self, platform)</dt></dl> | |
184 | |
185 <dl><dt><a name="PosixPlatformBackend-StartDisplayTracing"><strong>StartDisplayT
racing</strong></a>(self)</dt><dd><tt>Start gathering a trace&nbs
p;with frame timestamps close to physical<br> | |
186 display.</tt></dd></dl> | |
187 | |
188 <dl><dt><a name="PosixPlatformBackend-StartMonitoringPower"><strong>StartMonitor
ingPower</strong></a>(self, browser)</dt></dl> | |
189 | |
190 <dl><dt><a name="PosixPlatformBackend-StartVideoCapture"><strong>StartVideoCaptu
re</strong></a>(self, min_bitrate_mbps)</dt></dl> | |
191 | |
192 <dl><dt><a name="PosixPlatformBackend-StopDisplayTracing"><strong>StopDisplayTra
cing</strong></a>(self)</dt><dd><tt>Stop gathering a trace w
ith frame timestamps close to physical display.<br
> | |
193 <br> | |
194 Returns a raw tracing events that contains th
e timestamps of physical<br> | |
195 display.</tt></dd></dl> | |
196 | |
197 <dl><dt><a name="PosixPlatformBackend-StopMonitoringPower"><strong>StopMonitorin
gPower</strong></a>(self)</dt></dl> | |
198 | |
199 <dl><dt><a name="PosixPlatformBackend-StopVideoCapture"><strong>StopVideoCapture
</strong></a>(self)</dt></dl> | |
200 | |
201 <dl><dt><a name="PosixPlatformBackend-TakeScreenshot"><strong>TakeScreenshot</st
rong></a>(self, file_path)</dt></dl> | |
202 | |
203 <dl><dt><a name="PosixPlatformBackend-WillCloseBrowser"><strong>WillCloseBrowser
</strong></a>(self, browser, browser_backend)</dt></dl> | |
204 | |
205 <dl><dt><a name="PosixPlatformBackend-__init__"><strong>__init__</strong></a>(se
lf, device<font color="#909090">=None</font>)</dt><dd><tt>Initalize an 
;instance of PlatformBackend from a device optiona
lly.<br> | |
206 Call sites need to use SupportsDevice before
intialization to check<br> | |
207 whether this platform backend supports the device.
<br> | |
208 If device is None, this constructor returns t
he host platform backend<br> | |
209 which telemetry is running on.<br> | |
210 <br> | |
211 Args:<br> | |
212 device: an instance of telemetry.core.platform.d
evice.Device.</tt></dd></dl> | |
213 | |
214 <hr> | |
215 Class methods inherited from <a href="telemetry.internal.platform.platform_backe
nd.html#PlatformBackend">telemetry.internal.platform.platform_backend.PlatformBa
ckend</a>:<br> | |
216 <dl><dt><a name="PosixPlatformBackend-CreatePlatformForDevice"><strong>CreatePla
tformForDevice</strong></a>(cls, device, finder_options)<font color="#909090"><f
ont face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.ty
pe</a></font></font></dt></dl> | |
217 | |
218 <dl><dt><a name="PosixPlatformBackend-IsPlatformBackendForHost"><strong>IsPlatfo
rmBackendForHost</strong></a>(cls)<font color="#909090"><font face="helvetica, a
rial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></
dt><dd><tt>Returns whether this platform backend is&nbs
p;the platform backend to be used<br> | |
219 for the host device which telemetry is runnin
g on.</tt></dd></dl> | |
220 | |
221 <dl><dt><a name="PosixPlatformBackend-SupportsDevice"><strong>SupportsDevice</st
rong></a>(cls, device)<font color="#909090"><font face="helvetica, arial"> from
<a href="__builtin__.html#type">__builtin__.type</a></font></font></dt><dd><tt>R
eturns whether this platform backend supports inti
alization from the<br> | |
222 device.</tt></dd></dl> | |
223 | |
224 <hr> | |
225 Data descriptors inherited from <a href="telemetry.internal.platform.platform_ba
ckend.html#PlatformBackend">telemetry.internal.platform.platform_backend.Platfor
mBackend</a>:<br> | |
226 <dl><dt><strong>__dict__</strong></dt> | |
227 <dd><tt>dictionary for instance variables (if defined)<
/tt></dd> | |
228 </dl> | |
229 <dl><dt><strong>__weakref__</strong></dt> | |
230 <dd><tt>list of weak references to the object 
;(if defined)</tt></dd> | |
231 </dl> | |
232 <dl><dt><strong>forwarder_factory</strong></dt> | |
233 </dl> | |
234 <dl><dt><strong>is_host_platform</strong></dt> | |
235 </dl> | |
236 <dl><dt><strong>is_video_capture_running</strong></dt> | |
237 </dl> | |
238 <dl><dt><strong>network_controller_backend</strong></dt> | |
239 </dl> | |
240 <dl><dt><strong>platform</strong></dt> | |
241 </dl> | |
242 <dl><dt><strong>running_browser_backends</strong></dt> | |
243 </dl> | |
244 <dl><dt><strong>tracing_controller_backend</strong></dt> | |
245 </dl> | |
246 <dl><dt><strong>wpr_ca_cert_path</strong></dt> | |
247 </dl> | |
248 <dl><dt><strong>wpr_http_device_port</strong></dt> | |
249 </dl> | |
250 <dl><dt><strong>wpr_https_device_port</strong></dt> | |
251 </dl> | |
252 </td></tr></table></td></tr></table> | |
253 </body></html> | |
OLD | NEW |