2 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.0 Transitional//EN">
3 <html><head><title>Python: module telemetry.core.browser
</title>
4 </head><body bgcolor=
"#f0f0f8">
6 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"heading">
8 <td valign=bottom
> <br>
9 <font color=
"#ffffff" face=
"helvetica, arial"> <br><big><big><strong><a href=
"telemetry.html"><font color=
"#ffffff">telemetry
</font></a>.
<a href=
"telemetry.core.html"><font color=
"#ffffff">core
</font></a>.browser
</strong></big></big></font></td
10 ><td align=right valign=bottom
11 ><font color=
"#ffffff" face=
"helvetica, arial"><a href=
".">index
</a><br><a href=
"../telemetry/core/browser.py">telemetry/core/browser.py
</a></font></td></tr></table>
12 <p><tt>#
Copyright
(c)
2012 The
Chromium
Authors.
All
rights
reserved.
<br>
13 #
Use
of
this
source
code
is
governed
by
a
BSD-style
license
that
can
be
<br>
14 #
found
in
the
LICENSE
file.
</tt></p>
16 <table width=
"100%" cellspacing=
0 cellpadding=
2 border=
0 summary=
"section">
17 <tr bgcolor=
"#aa55cc">
18 <td colspan=
3 valign=bottom
> <br>
19 <font color=
"#ffffff" face=
"helvetica, arial"><big><strong>Modules
</strong></big></font></td></tr>
21 <tr><td bgcolor=
"#aa55cc"><tt> </tt></td><td> </td>
22 <td width=
"100%"><table width=
"100%" summary=
"list"><tr><td width=
"25%" valign=top
><a href=
"telemetry.core.chrome.browser_backend.html">telemetry.core.chrome.browser_backend
</a><br>
23 <a href=
"telemetry.core.browser_credentials.html">telemetry.core.browser_credentials
</a><br>
24 <a href=
"telemetry.core.extension_dict.html">telemetry.core.extension_dict
</a><br>
25 </td><td width=
"25%" valign=top
><a href=
"os.html">os
</a><br>
26 <a href=
"telemetry.core.platform.html">telemetry.core.platform
</a><br>
27 <a href=
"telemetry.core.platform.profiler.profiler_finder.html">telemetry.core.platform.profiler.profiler_finder
</a><br>
28 </td><td width=
"25%" valign=top
><a href=
"telemetry.core.tab_list.html">telemetry.core.tab_list
</a><br>
29 <a href=
"telemetry.core.temporary_http_server.html">telemetry.core.temporary_http_server
</a><br>
30 <a href=
"telemetry.core.wpr_modes.html">telemetry.core.wpr_modes
</a><br>
31 </td><td width=
"25%" valign=top
><a href=
"telemetry.core.wpr_server.html">telemetry.core.wpr_server
</a><br>
32 </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>
38 <tr><td bgcolor=
"#ee77aa"><tt> </tt></td><td> </td>
40 <dt><font face=
"helvetica, arial"><a href=
"__builtin__.html#object">__builtin__.object
</a>
43 <dt><font face=
"helvetica, arial"><a href=
"telemetry.core.browser.html#Browser">Browser
</a>
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=
"Browser">class
<strong>Browser
</strong></a>(
<a href=
"__builtin__.html#object">__builtin__.object
</a>)
</font></td></tr>
53 <tr bgcolor=
"#ffc8d8"><td rowspan=
2><tt> </tt></td>
54 <td colspan=
2><tt>A
running
browser
instance
that
can
be
controlled
in
a
limited
way.
<br>
56 To
create
a
browser
instance,
use
browser_finder.FindBrowser.
<br>
58 Be
sure
to
clean
up
after
yourself
by
calling
<a href=
"#Browser-Close">Close
</a>()
when
you
are
done
with
<br>
59 the
browser.
Or
better
yet:
<br>
60 browser_to_create
=
FindBrowser(options)
<br>
61 with
browser_to_create.Create()
as
browser:
<br>
62 ...
do
all
your
operations
on
browser
here
<br> </tt></td></tr>
64 <td width=
"100%">Methods defined here:
<br>
65 <dl><dt><a name=
"Browser-Close"><strong>Close
</strong></a>(self)
</dt><dd><tt>Closes
this
browser.
</tt></dd></dl>
67 <dl><dt><a name=
"Browser-GetStackTrace"><strong>GetStackTrace
</strong></a>(self)
</dt></dl>
69 <dl><dt><a name=
"Browser-GetStandardOutput"><strong>GetStandardOutput
</strong></a>(self)
</dt></dl>
71 <dl><dt><a name=
"Browser-GetTraceResultAndReset"><strong>GetTraceResultAndReset
</strong></a>(self)
</dt><dd><tt>Returns
the
result
of
the
trace,
as
TraceResult
<a href=
"__builtin__.html#object">object
</a>.
</tt></dd></dl>
73 <dl><dt><a name=
"Browser-SetHTTPServerDirectories"><strong>SetHTTPServerDirectories
</strong></a>(self, paths)
</dt><dd><tt>Returns
True
if
the
HTTP
server
was
started,
False
otherwise.
</tt></dd></dl>
75 <dl><dt><a name=
"Browser-SetReplayArchivePath"><strong>SetReplayArchivePath
</strong></a>(self, archive_path, append_to_existing_wpr
<font color=
"#909090">=False
</font>, make_javascript_deterministic
<font color=
"#909090">=True
</font>)
</dt></dl>
77 <dl><dt><a name=
"Browser-StartProfiling"><strong>StartProfiling
</strong></a>(self, options, base_output_file)
</dt><dd><tt>Starts
profiling
using
|options|.profiler_tool.
Results
are
saved
to
<br>
78 |base_output_file|.
<process_name
>.
</tt></dd></dl>
80 <dl><dt><a name=
"Browser-StartTracing"><strong>StartTracing
</strong></a>(self, custom_categories
<font color=
"#909090">=None
</font>, timeout
<font color=
"#909090">=
10</font>)
</dt></dl>
82 <dl><dt><a name=
"Browser-StopProfiling"><strong>StopProfiling
</strong></a>(self)
</dt><dd><tt>Stops
all
active
profilers
and
saves
their
results.
</tt></dd></dl>
84 <dl><dt><a name=
"Browser-StopTracing"><strong>StopTracing
</strong></a>(self)
</dt></dl>
86 <dl><dt><a name=
"Browser-__enter__"><strong>__enter__
</strong></a>(self)
</dt></dl>
88 <dl><dt><a name=
"Browser-__exit__"><strong>__exit__
</strong></a>(self, *args)
</dt></dl>
90 <dl><dt><a name=
"Browser-__init__"><strong>__init__
</strong></a>(self, backend, platform_backend)
</dt></dl>
92 <dl><dt><a name=
"Browser-is_profiler_active"><strong>is_profiler_active
</strong></a>(self, profiler_name)
</dt></dl>
95 Data descriptors defined here:
<br>
96 <dl><dt><strong>__dict__
</strong></dt>
97 <dd><tt>dictionary
for
instance
variables
(if
defined)
</tt></dd>
99 <dl><dt><strong>__weakref__
</strong></dt>
100 <dd><tt>list
of
weak
references
to
the
object
(if
defined)
</tt></dd>
102 <dl><dt><strong>browser_type
</strong></dt>
104 <dl><dt><strong>extensions
</strong></dt>
105 <dd><tt>Returns
the
extension
dictionary
if
it
exists.
</tt></dd>
107 <dl><dt><strong>http_server
</strong></dt>
109 <dl><dt><strong>io_stats
</strong></dt>
110 <dd><tt>Returns
a
dict
of
IO
statistics
for
the
browser:
<br>
111 {
'Browser':
{
<br>
112 'ReadOperationCount':
W,
<br>
113 'WriteOperationCount':
X,
<br>
114 'ReadTransferCount':
Y,
<br>
115 'WriteTransferCount':
Z
<br>
117 'Gpu':
{
<br>
118 'ReadOperationCount':
W,
<br>
119 'WriteOperationCount':
X,
<br>
120 'ReadTransferCount':
Y,
<br>
121 'WriteTransferCount':
Z
<br>
123 'Renderer':
{
<br>
124 'ReadOperationCount':
W,
<br>
125 'WriteOperationCount':
X,
<br>
126 'ReadTransferCount':
Y,
<br>
127 'WriteTransferCount':
Z
<br>
131 <dl><dt><strong>is_content_shell
</strong></dt>
132 <dd><tt>Returns
whether
this
browser
is
a
content
shell,
only.
</tt></dd>
134 <dl><dt><strong>memory_stats
</strong></dt>
135 <dd><tt>Returns
a
dict
of
memory
statistics
for
the
browser:
<br>
136 {
'Browser':
{
<br>
137 'VM':
S,
<br>
138 'VMPeak':
T,
<br>
139 'WorkingSetSize':
U,
<br>
140 'WorkingSetSizePeak':
V,
<br>
141 'ProportionalSetSize':
W,
<br>
142 'PrivateDirty':
X
<br>
144 'Gpu':
{
<br>
145 'VM':
S,
<br>
146 'VMPeak':
T,
<br>
147 'WorkingSetSize':
U,
<br>
148 'WorkingSetSizePeak':
V,
<br>
149 'ProportionalSetSize':
W,
<br>
150 'PrivateDirty':
X
<br>
152 'Renderer':
{
<br>
153 'VM':
S,
<br>
154 'VMPeak':
T,
<br>
155 'WorkingSetSize':
U,
<br>
156 'WorkingSetSizePeak':
V,
<br>
157 'ProportionalSetSize':
W,
<br>
158 'PrivateDirty':
X
<br>
160 'SystemCommitCharge':
Y,
<br>
161 'ProcessCount':
Z,
<br>
163 Any
of
the
above
keys
may
be
missing
on
a
per-platform
basis.
</tt></dd>
165 <dl><dt><strong>platform
</strong></dt>
167 <dl><dt><strong>supports_extensions
</strong></dt>
169 <dl><dt><strong>supports_tab_control
</strong></dt>
171 <dl><dt><strong>supports_tracing
</strong></dt>
173 <dl><dt><strong>tabs
</strong></dt>
175 </td></tr></table></td></tr></table>