diff options
author | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 10:50:33 +0000 |
---|---|---|
committer | nduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-19 10:50:33 +0000 |
commit | 3e7ad45288402d485211eac52f0610ddf64ea8f2 (patch) | |
tree | 984494253b06b473857d932055323442fd00e542 | |
parent | ce3f99f4f167a45fc3d525ffe0529600dc8e9212 (diff) | |
download | chromium_src-3e7ad45288402d485211eac52f0610ddf64ea8f2.zip chromium_src-3e7ad45288402d485211eac52f0610ddf64ea8f2.tar.gz chromium_src-3e7ad45288402d485211eac52f0610ddf64ea8f2.tar.bz2 |
[telemetry] Timeline model cleanups
R=tengs@chromium.org
Review URL: https://chromiumcodereview.appspot.com/19772005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212559 0039d316-1c4b-4281-b951-d872f2087c98
61 files changed, 1159 insertions, 778 deletions
diff --git a/tools/telemetry/docs/telemetry.core.browser.html b/tools/telemetry/docs/telemetry.core.browser.html index 7bfb567..78dfc77 100644 --- a/tools/telemetry/docs/telemetry.core.browser.html +++ b/tools/telemetry/docs/telemetry.core.browser.html @@ -64,18 +64,20 @@ the browser. Or better yet:<br> <td width="100%">Methods defined here:<br> <dl><dt><a name="Browser-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this browser.</tt></dd></dl> +<dl><dt><a name="Browser-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <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> <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> -<dl><dt><a name="Browser-SetReplayArchivePath"><strong>SetReplayArchivePath</strong></a>(self, archive_path, append_to_existing_wpr<font color="#909090">=False</font>)</dt></dl> +<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> <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> |base_output_file|.<process_name>.</tt></dd></dl> -<dl><dt><a name="Browser-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt></dl> +<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> <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> diff --git a/tools/telemetry/docs/telemetry.core.chrome.adb_commands.html b/tools/telemetry/docs/telemetry.core.chrome.adb_commands.html index 8b043a9..7203e42 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.adb_commands.html +++ b/tools/telemetry/docs/telemetry.core.chrome.adb_commands.html @@ -115,6 +115,8 @@ Args:<br> <dl><dt><a name="AdbCommands-__init__"><strong>__init__</strong></a>(self, device)</dt></dl> +<dl><dt><a name="AdbCommands-device"><strong>device</strong></a>(self)</dt></dl> + <hr> Data descriptors defined here:<br> <dl><dt><strong>__dict__</strong></dt> @@ -136,6 +138,12 @@ Data descriptors defined here:<br> <dl><dt><a name="Forwarder-__init__"><strong>__init__</strong></a>(self, adb, *port_pairs)</dt></dl> <hr> +Static methods defined here:<br> +<dl><dt><a name="Forwarder-KillDevice"><strong>KillDevice</strong></a>(adb)</dt></dl> + +<dl><dt><a name="Forwarder-KillHost"><strong>KillHost</strong></a>()</dt></dl> + +<hr> Data descriptors defined here:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>dictionary for instance variables (if defined)</tt></dd> diff --git a/tools/telemetry/docs/telemetry.core.chrome.android_browser_backend.html b/tools/telemetry/docs/telemetry.core.chrome.android_browser_backend.html index c521930..f1cd499 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.android_browser_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.android_browser_backend.html @@ -26,8 +26,8 @@ <a href="os.html">os</a><br> <a href="subprocess.html">subprocess</a><br> </td><td width="25%" valign=top><a href="sys.html">sys</a><br> -<a href="tempfile.html">tempfile</a><br> <a href="time.html">time</a><br> +<a href="telemetry.core.util.html">telemetry.core.util</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -81,6 +81,8 @@ Methods defined here:<br> <dl><dt><a name="AndroidBrowserBackend-GetRemotePort"><strong>GetRemotePort</strong></a>(self, local_port)</dt></dl> +<dl><dt><a name="AndroidBrowserBackend-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="AndroidBrowserBackend-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <dl><dt><a name="AndroidBrowserBackend-IsBrowserRunning"><strong>IsBrowserRunning</strong></a>(self)</dt></dl> @@ -105,7 +107,7 @@ Methods inherited from <a href="telemetry.core.chrome.browser_backend.html#Brows <dl><dt><a name="AndroidBrowserBackend-SetBrowser"><strong>SetBrowser</strong></a>(self, browser)</dt></dl> -<dl><dt><a name="AndroidBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> +<dl><dt><a name="AndroidBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=60</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> comma separated categories that will be traced instead of the<br> default category set. Example: use<br> "webkit,cc,disabled-by-default-cc.debug" to trace only those three<br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.android_browser_finder.html b/tools/telemetry/docs/telemetry.core.chrome.android_browser_finder.html index ab44cb9..188c5a8 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.android_browser_finder.html +++ b/tools/telemetry/docs/telemetry.core.chrome.android_browser_finder.html @@ -86,7 +86,7 @@ Data descriptors inherited from <a href="telemetry.core.possible_browser.html#Po <font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> <tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-FindAllAvailableBrowsers"><strong>FindAllAvailableBrowsers</strong></a>(options, logging<font color="#909090">=<module 'logging' from '/usr/lib/python2.7/logging/__init__.pyc'></font>)</dt><dd><tt>Finds all the desktop browsers available on this machine.</tt></dd></dl> +<td width="100%"><dl><dt><a name="-FindAllAvailableBrowsers"><strong>FindAllAvailableBrowsers</strong></a>(options, logging<font color="#909090">=<module 'logging' from '/System/Library/Framewor...Versions/2.7/lib/python2.7/logging/__init__.pyc'></font>)</dt><dd><tt>Finds all the desktop browsers available on this machine.</tt></dd></dl> </td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#55aa55"> diff --git a/tools/telemetry/docs/telemetry.core.chrome.browser_backend.html b/tools/telemetry/docs/telemetry.core.chrome.browser_backend.html index 8c39337..0dc4879 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.browser_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.browser_backend.html @@ -23,17 +23,18 @@ <a href="telemetry.core.chrome.extension_dict_backend.html">telemetry.core.chrome.extension_dict_backend</a><br> <a href="httplib.html">httplib</a><br> <a href="json.html">json</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.chrome.misc_web_contents_backend.html">telemetry.core.chrome.misc_web_contents_backend</a><br> -<a href="telemetry.unittest.options_for_unittests.html">telemetry.unittest.options_for_unittests</a><br> +<a href="telemetry.core.chrome.misc_web_contents_backend.html">telemetry.core.chrome.misc_web_contents_backend</a><br> +</td><td width="25%" valign=top><a href="telemetry.unittest.options_for_unittests.html">telemetry.unittest.options_for_unittests</a><br> <a href="re.html">re</a><br> <a href="socket.html">socket</a><br> -</td><td width="25%" valign=top><a href="sys.html">sys</a><br> +<a href="sys.html">sys</a><br> <a href="telemetry.core.chrome.tab_list_backend.html">telemetry.core.chrome.tab_list_backend</a><br> -<a href="telemetry.core.chrome.tracing_backend.html">telemetry.core.chrome.tracing_backend</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.chrome.tracing_backend.html">telemetry.core.chrome.tracing_backend</a><br> <a href="urllib2.html">urllib2</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.user_agent.html">telemetry.core.user_agent</a><br> +<a href="telemetry.core.user_agent.html">telemetry.core.user_agent</a><br> <a href="telemetry.core.util.html">telemetry.core.util</a><br> -<a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br> +<a href="telemetry.core.web_contents.html">telemetry.core.web_contents</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br> <a href="telemetry.core.wpr_server.html">telemetry.core.wpr_server</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> @@ -78,6 +79,8 @@ once a remote-debugger port has been established.< <dl><dt><a name="BrowserBackend-GetRemotePort"><strong>GetRemotePort</strong></a>(self, _)</dt></dl> +<dl><dt><a name="BrowserBackend-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="BrowserBackend-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <dl><dt><a name="BrowserBackend-GetTraceResultAndReset"><strong>GetTraceResultAndReset</strong></a>(self)</dt></dl> @@ -88,7 +91,7 @@ once a remote-debugger port has been established.< <dl><dt><a name="BrowserBackend-SetBrowser"><strong>SetBrowser</strong></a>(self, browser)</dt></dl> -<dl><dt><a name="BrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> +<dl><dt><a name="BrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=60</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> comma separated categories that will be traced instead of the<br> default category set. Example: use<br> "webkit,cc,disabled-by-default-cc.debug" to trace only those three<br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.cros_browser_backend.html b/tools/telemetry/docs/telemetry.core.chrome.cros_browser_backend.html index f8ede9d..77f729c 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.cros_browser_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.cros_browser_backend.html @@ -20,13 +20,12 @@ <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <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> -<a href="telemetry.core.chrome.cros_util.html">telemetry.core.chrome.cros_util</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> -<a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -<a href="subprocess.html">subprocess</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.util.html">telemetry.core.util</a><br> -</td></tr></table></td></tr></table><p> +<a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> +</td><td width="25%" valign=top><a href="logging.html">logging</a><br> +<a href="os.html">os</a><br> +</td><td width="25%" valign=top><a href="subprocess.html">subprocess</a><br> +<a href="telemetry.core.util.html">telemetry.core.util</a><br> +</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom> <br> @@ -69,6 +68,8 @@ Methods defined here:<br> <dl><dt><a name="CrOSBrowserBackend-GetRemotePort"><strong>GetRemotePort</strong></a>(self, _)</dt></dl> +<dl><dt><a name="CrOSBrowserBackend-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="CrOSBrowserBackend-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <dl><dt><a name="CrOSBrowserBackend-IsBrowserRunning"><strong>IsBrowserRunning</strong></a>(self)</dt></dl> @@ -81,6 +82,8 @@ Methods defined here:<br> Data descriptors defined here:<br> <dl><dt><strong>hwid</strong></dt> </dl> +<dl><dt><strong>oobe</strong></dt> +</dl> <dl><dt><strong>pid</strong></dt> <dd><tt>Locates the pid of the main chrome browser process.<br> <br> @@ -107,7 +110,7 @@ Methods inherited from <a href="telemetry.core.chrome.browser_backend.html#Brows <dl><dt><a name="CrOSBrowserBackend-SetBrowser"><strong>SetBrowser</strong></a>(self, browser)</dt></dl> -<dl><dt><a name="CrOSBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> +<dl><dt><a name="CrOSBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=60</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> comma separated categories that will be traced instead of the<br> default category set. Example: use<br> "webkit,cc,disabled-by-default-cc.debug" to trace only those three<br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.cros_browser_finder.html b/tools/telemetry/docs/telemetry.core.chrome.cros_browser_finder.html index bfe4478..6533776 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.cros_browser_finder.html +++ b/tools/telemetry/docs/telemetry.core.chrome.cros_browser_finder.html @@ -19,14 +19,12 @@ <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.browser.html">telemetry.core.browser</a><br> <a href="telemetry.core.chrome.cros_browser_backend.html">telemetry.core.chrome.cros_browser_backend</a><br> -<a href="telemetry.core.chrome.cros_interface.html">telemetry.core.chrome.cros_interface</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.platform.cros_platform_backend.html">telemetry.core.platform.cros_platform_backend</a><br> -<a href="logging.html">logging</a><br> -<a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.possible_browser.html">telemetry.core.possible_browser</a><br> -<a href="telemetry.core.profile_types.html">telemetry.core.profile_types</a><br> -<a href="sys.html">sys</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> +</td><td width="25%" valign=top><a href="telemetry.core.chrome.cros_interface.html">telemetry.core.chrome.cros_interface</a><br> +<a href="telemetry.core.platform.cros_platform_backend.html">telemetry.core.platform.cros_platform_backend</a><br> +</td><td width="25%" valign=top><a href="logging.html">logging</a><br> +<a href="telemetry.core.possible_browser.html">telemetry.core.possible_browser</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.profile_types.html">telemetry.core.profile_types</a><br> +</td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom> <br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.cros_interface.html b/tools/telemetry/docs/telemetry.core.chrome.cros_interface.html index 00657e3..205da41 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.cros_interface.html +++ b/tools/telemetry/docs/telemetry.core.chrome.cros_interface.html @@ -21,7 +21,8 @@ <a href="os.html">os</a><br> </td><td width="25%" valign=top><a href="re.html">re</a><br> <a href="subprocess.html">subprocess</a><br> -</td><td width="25%" valign=top><a href="tempfile.html">tempfile</a><br> +</td><td width="25%" valign=top><a href="sys.html">sys</a><br> +<a href="tempfile.html">tempfile</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -234,6 +235,7 @@ Returns:<br> Captures and returns the command's stdout.<br> Prints the command's stderr to logger (which defaults to stdout).</tt></dd></dl> <dl><dt><a name="-HasSSH"><strong>HasSSH</strong></a>()</dt></dl> + <dl><dt><a name="-IsRunningOnCrosDevice"><strong>IsRunningOnCrosDevice</strong></a>()</dt><dd><tt>Returns True if we're on a ChromeOS device.</tt></dd></dl> <dl><dt><a name="-RunCmd"><strong>RunCmd</strong></a>(args, cwd<font color="#909090">=None</font>, quiet<font color="#909090">=False</font>)</dt><dd><tt>Opens a subprocess to execute a program and returns its return value.<br> <br> Args:<br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.cros_util.html b/tools/telemetry/docs/telemetry.core.chrome.cros_util.html deleted file mode 100644 index e58a97c..0000000 --- a/tools/telemetry/docs/telemetry.core.chrome.cros_util.html +++ /dev/null @@ -1,36 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.chrome.cros_util</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<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>.<a href="telemetry.core.chrome.html"><font color="#ffffff">chrome</font></a>.cros_util</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/chrome/cros_util.py">telemetry/core/chrome/cros_util.py</a></font></td></tr></table> - <p><tt># Copyright (c) 2013 The Chromium Authors. All rights reserved.<br> -# Use of this source code is governed by a BSD-style license that can be<br> -# found in the LICENSE file.</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.util.html">telemetry.core.util</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#eeaa77"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> - -<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> -<td width="100%"><dl><dt><a name="-NavigateGuestLogin"><strong>NavigateGuestLogin</strong></a>(browser_backend, cri)</dt><dd><tt>Navigates through oobe login screen as guest</tt></dd></dl> - <dl><dt><a name="-NavigateLogin"><strong>NavigateLogin</strong></a>(browser_backend, cri)</dt><dd><tt>Navigates through oobe login screen</tt></dd></dl> - <dl><dt><a name="-WaitForAccountPicker"><strong>WaitForAccountPicker</strong></a>(oobe)</dt><dd><tt>Waits for the oobe screen to be in the account picker state.</tt></dd></dl> - <dl><dt><a name="-WaitForGuestFsMounted"><strong>WaitForGuestFsMounted</strong></a>(cri)</dt><dd><tt>Waits for /home/chronos/user to be mounted as guestfs</tt></dd></dl> -</td></tr></table> -</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_backend.html b/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_backend.html index 87dc3de..5f2b6ae 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_backend.html @@ -65,6 +65,8 @@ Methods defined here:<br> <dl><dt><a name="DesktopBrowserBackend-GetBrowserStartupArgs"><strong>GetBrowserStartupArgs</strong></a>(self)</dt></dl> +<dl><dt><a name="DesktopBrowserBackend-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="DesktopBrowserBackend-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <dl><dt><a name="DesktopBrowserBackend-IsBrowserRunning"><strong>IsBrowserRunning</strong></a>(self)</dt></dl> @@ -93,7 +95,7 @@ Methods inherited from <a href="telemetry.core.chrome.browser_backend.html#Brows <dl><dt><a name="DesktopBrowserBackend-SetBrowser"><strong>SetBrowser</strong></a>(self, browser)</dt></dl> -<dl><dt><a name="DesktopBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> +<dl><dt><a name="DesktopBrowserBackend-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=60</font>)</dt><dd><tt>custom_categories is an optional string containing a list of<br> comma separated categories that will be traced instead of the<br> default category set. Example: use<br> "webkit,cc,disabled-by-default-cc.debug" to trace only those three<br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_finder.html b/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_finder.html index 6069080..a7a62d7 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_finder.html +++ b/tools/telemetry/docs/telemetry.core.chrome.desktop_browser_finder.html @@ -18,17 +18,18 @@ <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.browser.html">telemetry.core.browser</a><br> +<a href="telemetry.core.chrome.cros_interface.html">telemetry.core.chrome.cros_interface</a><br> <a href="telemetry.core.chrome.desktop_browser_backend.html">telemetry.core.chrome.desktop_browser_backend</a><br> <a href="telemetry.core.platform.linux_platform_backend.html">telemetry.core.platform.linux_platform_backend</a><br> </td><td width="25%" valign=top><a href="logging.html">logging</a><br> <a href="telemetry.core.platform.mac_platform_backend.html">telemetry.core.platform.mac_platform_backend</a><br> <a href="os.html">os</a><br> -</td><td width="25%" valign=top><a href="platform.html">platform</a><br> -<a href="telemetry.core.possible_browser.html">telemetry.core.possible_browser</a><br> +<a href="platform.html">platform</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.possible_browser.html">telemetry.core.possible_browser</a><br> <a href="telemetry.core.profile_types.html">telemetry.core.profile_types</a><br> -</td><td width="25%" valign=top><a href="subprocess.html">subprocess</a><br> +<a href="subprocess.html">subprocess</a><br> <a href="sys.html">sys</a><br> -<a href="telemetry.core.platform.win_platform_backend.html">telemetry.core.platform.win_platform_backend</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.platform.win_platform_backend.html">telemetry.core.platform.win_platform_backend</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> diff --git a/tools/telemetry/docs/telemetry.core.chrome.html b/tools/telemetry/docs/telemetry.core.chrome.html index b947b5f..fc38ab2 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.html +++ b/tools/telemetry/docs/telemetry.core.chrome.html @@ -29,9 +29,8 @@ <a href="telemetry.core.chrome.cros_browser_finder_unittest.html">cros_browser_finder_unittest</a><br> <a href="telemetry.core.chrome.cros_interface.html">cros_interface</a><br> <a href="telemetry.core.chrome.cros_interface_unittest.html">cros_interface_unittest</a><br> -<a href="telemetry.core.chrome.cros_util.html">cros_util</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.chrome.crx_id.html">crx_id</a><br> -<a href="telemetry.core.chrome.desktop_browser_backend.html">desktop_browser_backend</a><br> +<a href="telemetry.core.chrome.crx_id.html">crx_id</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.chrome.desktop_browser_backend.html">desktop_browser_backend</a><br> <a href="telemetry.core.chrome.desktop_browser_finder.html">desktop_browser_finder</a><br> <a href="telemetry.core.chrome.desktop_browser_finder_unittest.html">desktop_browser_finder_unittest</a><br> <a href="telemetry.core.chrome.extension_dict_backend.html">extension_dict_backend</a><br> @@ -41,8 +40,8 @@ <a href="telemetry.core.chrome.form_based_credentials_backend_unittest_base.html">form_based_credentials_backend_unittest_base</a><br> <a href="telemetry.core.chrome.google_credentials_backend.html">google_credentials_backend</a><br> <a href="telemetry.core.chrome.google_credentials_backend_unittest.html">google_credentials_backend_unittest</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.chrome.inspector_backend.html">inspector_backend</a><br> -<a href="telemetry.core.chrome.inspector_console.html">inspector_console</a><br> +<a href="telemetry.core.chrome.inspector_backend.html">inspector_backend</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.chrome.inspector_console.html">inspector_console</a><br> <a href="telemetry.core.chrome.inspector_console_unittest.html">inspector_console_unittest</a><br> <a href="telemetry.core.chrome.inspector_memory.html">inspector_memory</a><br> <a href="telemetry.core.chrome.inspector_memory_unittest.html">inspector_memory_unittest</a><br> @@ -52,8 +51,8 @@ <a href="telemetry.core.chrome.inspector_runtime.html">inspector_runtime</a><br> <a href="telemetry.core.chrome.inspector_runtime_unittest.html">inspector_runtime_unittest</a><br> <a href="telemetry.core.chrome.inspector_timeline.html">inspector_timeline</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.chrome.inspector_timeline_unittest.html">inspector_timeline_unittest</a><br> -<a href="telemetry.core.chrome.misc_web_contents_backend.html">misc_web_contents_backend</a><br> +<a href="telemetry.core.chrome.inspector_timeline_unittest.html">inspector_timeline_unittest</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.chrome.misc_web_contents_backend.html">misc_web_contents_backend</a><br> <a href="telemetry.core.chrome.png_bitmap.html">png_bitmap</a><br> <a href="telemetry.core.chrome.png_bitmap_unittest.html">png_bitmap_unittest</a><br> <a href="telemetry.core.chrome.tab_list_backend.html">tab_list_backend</a><br> diff --git a/tools/telemetry/docs/telemetry.core.chrome.tab_list_backend.html b/tools/telemetry/docs/telemetry.core.chrome.tab_list_backend.html index 6e1ebcb..67df8f2 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.tab_list_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.tab_list_backend.html @@ -55,7 +55,7 @@ <dl><dt><a name="TabListBackend-CloseTab"><strong>CloseTab</strong></a>(self, debugger_url, timeout<font color="#909090">=None</font>)</dt></dl> -<dl><dt><a name="TabListBackend-DoesDebuggerUrlExist"><strong>DoesDebuggerUrlExist</strong></a>(self, url)</dt></dl> +<dl><dt><a name="TabListBackend-DoesDebuggerUrlExist"><strong>DoesDebuggerUrlExist</strong></a>(self, debugger_url)</dt></dl> <dl><dt><a name="TabListBackend-Get"><strong>Get</strong></a>(self, index, ret)</dt><dd><tt>Returns self[index] if it exists, or ret if index is out of bounds.</tt></dd></dl> diff --git a/tools/telemetry/docs/telemetry.core.chrome.tracing_backend.html b/tools/telemetry/docs/telemetry.core.chrome.tracing_backend.html index 9328777..e1e7a7f 100644 --- a/tools/telemetry/docs/telemetry.core.chrome.tracing_backend.html +++ b/tools/telemetry/docs/telemetry.core.chrome.tracing_backend.html @@ -80,7 +80,7 @@ Data descriptors defined here:<br> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> -<dl><dt><a name="TracingBackend-BeginTracing"><strong>BeginTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt></dl> +<dl><dt><a name="TracingBackend-BeginTracing"><strong>BeginTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>, timeout<font color="#909090">=10</font>)</dt></dl> <dl><dt><a name="TracingBackend-Close"><strong>Close</strong></a>(self)</dt></dl> diff --git a/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html b/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html index c4991c4..de53df5 100644 --- a/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html +++ b/tools/telemetry/docs/telemetry.core.memory_cache_http_server.html @@ -22,10 +22,11 @@ <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="BaseHTTPServer.html">BaseHTTPServer</a><br> <a href="SimpleHTTPServer.html">SimpleHTTPServer</a><br> </td><td width="25%" valign=top><a href="SocketServer.html">SocketServer</a><br> +<a href="StringIO.html">StringIO</a><br> +</td><td width="25%" valign=top><a href="gzip.html">gzip</a><br> <a href="mimetypes.html">mimetypes</a><br> </td><td width="25%" valign=top><a href="os.html">os</a><br> <a href="sys.html">sys</a><br> -</td><td width="25%" valign=top><a href="zlib.html">zlib</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -94,9 +95,6 @@ Static methods defined here:<br> <hr> Data descriptors defined here:<br> -<dl><dt><strong>__dict__</strong></dt> -<dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> -</dl> <dl><dt><strong>from_byte</strong></dt> <dd><tt>Alias for field number 0</tt></dd> </dl> @@ -233,7 +231,7 @@ probably be diagnosed.)</tt></dd></dl> <hr> Data and other attributes inherited from <a href="SimpleHTTPServer.html#SimpleHTTPRequestHandler">SimpleHTTPServer.SimpleHTTPRequestHandler</a>:<br> -<dl><dt><strong>extensions_map</strong> = {'': 'application/octet-stream', '.%': 'application/x-trash', '.323': 'text/h323', '.3gp': 'video/3gpp', '.7z': 'application/x-7z-compressed', '.a': 'application/octet-stream', '.abw': 'application/x-abiword', '.ai': 'application/postscript', '.aif': 'audio/x-aiff', '.aifc': 'audio/x-aiff', ...}</dl> +<dl><dt><strong>extensions_map</strong> = {'': 'application/octet-stream', '.123': 'application/vnd.lotus-1-2-3', '.3dml': 'text/vnd.in3d.3dml', '.3g2': 'video/3gpp2', '.3gp': 'video/3gpp', '.7z': 'application/x-7z-compressed', '.a': 'application/octet-stream', '.aab': 'application/x-authorware-bin', '.aac': 'audio/x-aac', '.aam': 'application/x-authorware-map', ...}</dl> <dl><dt><strong>server_version</strong> = 'SimpleHTTP/0.6'</dl> @@ -329,7 +327,7 @@ Data and other attributes inherited from <a href="BaseHTTPServer.html#BaseHTTPRe <dl><dt><strong>responses</strong> = {100: ('Continue', 'Request received, please continue'), 101: ('Switching Protocols', 'Switching to new protocol; obey Upgrade header'), 200: ('OK', 'Request fulfilled, document follows'), 201: ('Created', 'Document created, URL follows'), 202: ('Accepted', 'Request accepted, processing continues off-line'), 203: ('Non-Authoritative Information', 'Request fulfilled from cache'), 204: ('No Content', 'Request fulfilled, nothing follows'), 205: ('Reset Content', 'Clear input form for further input.'), 206: ('Partial Content', 'Partial content follows.'), 300: ('Multiple Choices', 'Object has several resources -- see URI list'), ...}</dl> -<dl><dt><strong>sys_version</strong> = 'Python/2.7.3'</dl> +<dl><dt><strong>sys_version</strong> = 'Python/2.7.2'</dl> <dl><dt><strong>weekdayname</strong> = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']</dl> @@ -497,9 +495,6 @@ Static methods defined here:<br> <hr> Data descriptors defined here:<br> -<dl><dt><strong>__dict__</strong></dt> -<dd><tt>Return a new OrderedDict which maps field names to their values</tt></dd> -</dl> <dl><dt><strong>byte_range</strong></dt> <dd><tt>Alias for field number 1</tt></dd> </dl> diff --git a/tools/telemetry/docs/telemetry.core.platform.profiler.html b/tools/telemetry/docs/telemetry.core.platform.profiler.html index 0c4aee3..706c5e0 100644 --- a/tools/telemetry/docs/telemetry.core.platform.profiler.html +++ b/tools/telemetry/docs/telemetry.core.platform.profiler.html @@ -25,7 +25,8 @@ <a href="telemetry.core.platform.profiler.profiler_finder.html">profiler_finder</a><br> </td><td width="25%" valign=top><a href="telemetry.core.platform.profiler.sample_profiler.html">sample_profiler</a><br> <a href="telemetry.core.platform.profiler.tcmalloc_heap_profiler.html">tcmalloc_heap_profiler</a><br> -</td><td width="25%" valign=top></td></tr></table></td></tr></table><p> +</td><td width="25%" valign=top><a href="telemetry.core.platform.profiler.trace_profiler.html">trace_profiler</a><br> +</td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom> <br> diff --git a/tools/telemetry/docs/telemetry.core.platform.profiler.profiler_finder.html b/tools/telemetry/docs/telemetry.core.platform.profiler.profiler_finder.html index 38a7f20..f1c64cb 100644 --- a/tools/telemetry/docs/telemetry.core.platform.profiler.profiler_finder.html +++ b/tools/telemetry/docs/telemetry.core.platform.profiler.profiler_finder.html @@ -24,6 +24,7 @@ </td><td width="25%" valign=top><a href="telemetry.core.platform.profiler.perf_profiler.html">telemetry.core.platform.profiler.perf_profiler</a><br> <a href="telemetry.core.platform.profiler.sample_profiler.html">telemetry.core.platform.profiler.sample_profiler</a><br> </td><td width="25%" valign=top><a href="telemetry.core.platform.profiler.tcmalloc_heap_profiler.html">telemetry.core.platform.profiler.tcmalloc_heap_profiler</a><br> +<a href="telemetry.core.platform.profiler.trace_profiler.html">telemetry.core.platform.profiler.trace_profiler</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#eeaa77"> diff --git a/tools/telemetry/docs/telemetry.core.platform.profiler.trace_profiler.html b/tools/telemetry/docs/telemetry.core.platform.profiler.trace_profiler.html new file mode 100644 index 0000000..e76e114 --- /dev/null +++ b/tools/telemetry/docs/telemetry.core.platform.profiler.trace_profiler.html @@ -0,0 +1,72 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module telemetry.core.platform.profiler.trace_profiler</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<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>.<a href="telemetry.core.platform.html"><font color="#ffffff">platform</font></a>.<a href="telemetry.core.platform.profiler.html"><font color="#ffffff">profiler</font></a>.trace_profiler</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/platform/profiler/trace_profiler.py">telemetry/core/platform/profiler/trace_profiler.py</a></font></td></tr></table> + <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> +# Use of this source code is governed by a BSD-style license that can be<br> +# found in the LICENSE file.</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#aa55cc"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> + +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="codecs.html">codecs</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.platform.profiler.html">telemetry.core.platform.profiler</a><br> +</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ee77aa"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> + +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> +<td width="100%"><dl> +<dt><font face="helvetica, arial"><a href="telemetry.core.platform.profiler.html#Profiler">telemetry.core.platform.profiler.Profiler</a>(<a href="__builtin__.html#object">__builtin__.object</a>) +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="telemetry.core.platform.profiler.trace_profiler.html#TraceProfiler">TraceProfiler</a> +</font></dt></dl> +</dd> +</dl> + <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="TraceProfiler">class <strong>TraceProfiler</strong></a>(<a href="telemetry.core.platform.profiler.html#Profiler">telemetry.core.platform.profiler.Profiler</a>)</font></td></tr> + +<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> +<td width="100%"><dl><dt>Method resolution order:</dt> +<dd><a href="telemetry.core.platform.profiler.trace_profiler.html#TraceProfiler">TraceProfiler</a></dd> +<dd><a href="telemetry.core.platform.profiler.html#Profiler">telemetry.core.platform.profiler.Profiler</a></dd> +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> +</dl> +<hr> +Methods defined here:<br> +<dl><dt><a name="TraceProfiler-CollectProfile"><strong>CollectProfile</strong></a>(self)</dt></dl> + +<dl><dt><a name="TraceProfiler-__init__"><strong>__init__</strong></a>(self, browser_backend, platform_backend, output_path)</dt></dl> + +<hr> +Class methods defined here:<br> +<dl><dt><a name="TraceProfiler-is_supported"><strong>is_supported</strong></a>(cls, options)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl> + +<dl><dt><a name="TraceProfiler-name"><strong>name</strong></a>(cls)<font color="#909090"><font face="helvetica, arial"> from <a href="__builtin__.html#type">__builtin__.type</a></font></font></dt></dl> + +<hr> +Data descriptors inherited from <a href="telemetry.core.platform.profiler.html#Profiler">telemetry.core.platform.profiler.Profiler</a>:<br> +<dl><dt><strong>__dict__</strong></dt> +<dd><tt>dictionary for instance variables (if defined)</tt></dd> +</dl> +<dl><dt><strong>__weakref__</strong></dt> +<dd><tt>list of weak references to the object (if defined)</tt></dd> +</dl> +</td></tr></table></td></tr></table> +</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.async_slice.html b/tools/telemetry/docs/telemetry.core.timeline.async_slice.html index 548ef05..ab97bb0 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.async_slice.html +++ b/tools/telemetry/docs/telemetry.core.timeline.async_slice.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.async_slice</title> +<html><head><title>Python: module telemetry.core.timeline.async_slice</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.async_slice</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.async_slice</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/async_slice.py">telemetry/core/timeline/tracing/async_slice.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/async_slice.py">telemetry/core/timeline/async_slice.py</a></font></td></tr></table> <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> @@ -19,7 +19,7 @@ <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.slice.html">telemetry.core.timeline.tracing.slice</a><br> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event.html">telemetry.core.timeline.event</a><br> </td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -28,10 +28,10 @@ <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> <td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.slice.html#Slice">telemetry.core.timeline.tracing.slice.Slice</a>(<a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>) +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.async_slice.html#AsyncSlice">AsyncSlice</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.async_slice.html#AsyncSlice">AsyncSlice</a> </font></dt></dl> </dd> </dl> @@ -39,7 +39,7 @@ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="AsyncSlice">class <strong>AsyncSlice</strong></a>(<a href="telemetry.core.timeline.tracing.slice.html#Slice">telemetry.core.timeline.tracing.slice.Slice</a>)</font></td></tr> +<font color="#000000" face="helvetica, arial"><a name="AsyncSlice">class <strong>AsyncSlice</strong></a>(<a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>)</font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>A <a href="#AsyncSlice">AsyncSlice</a> represents an interval of time during which an<br> @@ -47,8 +47,7 @@ asynchronous operation is in progress. An <a href= itself and so is only associated with Threads at its start and end point.<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.async_slice.html#AsyncSlice">AsyncSlice</a></dd> -<dd><a href="telemetry.core.timeline.tracing.slice.html#Slice">telemetry.core.timeline.tracing.slice.Slice</a></dd> +<dd><a href="telemetry.core.timeline.async_slice.html#AsyncSlice">AsyncSlice</a></dd> <dd><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> @@ -56,27 +55,12 @@ itself and so is only associated with Threads Methods defined here:<br> <dl><dt><a name="AsyncSlice-AddSubSlice"><strong>AddSubSlice</strong></a>(self, sub_slice)</dt></dl> -<dl><dt><a name="AsyncSlice-__init__"><strong>__init__</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>)</dt></dl> +<dl><dt><a name="AsyncSlice-IterEventsInThisContainerRecrusively"><strong>IterEventsInThisContainerRecrusively</strong></a>(self)</dt></dl> -<hr> -Methods inherited from <a href="telemetry.core.timeline.tracing.slice.html#Slice">telemetry.core.timeline.tracing.slice.Slice</a>:<br> -<dl><dt><a name="AsyncSlice-GetAllSubSlices"><strong>GetAllSubSlices</strong></a>(self)</dt></dl> +<dl><dt><a name="AsyncSlice-__init__"><strong>__init__</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>)</dt></dl> <hr> -Data descriptors inherited from <a href="telemetry.core.timeline.tracing.slice.html#Slice">telemetry.core.timeline.tracing.slice.Slice</a>:<br> -<dl><dt><strong>sub_slices</strong></dt> -</dl> -<hr> Methods inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> -<dl><dt><a name="AsyncSlice-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="AsyncSlice-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="AsyncSlice-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt><dd><tt>Updates the start time to be the minimum start time of all<br> -child events and the end time to be the maximum end time of all<br> -child events.</tt></dd></dl> - <dl><dt><a name="AsyncSlice-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> <hr> @@ -89,8 +73,5 @@ Data descriptors inherited from <a href="telemetry.core.timeline.event.html#Time </dl> <dl><dt><strong>end</strong></dt> </dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.bounds.html b/tools/telemetry/docs/telemetry.core.timeline.bounds.html new file mode 100644 index 0000000..acfa427 --- /dev/null +++ b/tools/telemetry/docs/telemetry.core.timeline.bounds.html @@ -0,0 +1,71 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module telemetry.core.timeline.bounds</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.bounds</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/bounds.py">telemetry/core/timeline/bounds.py</a></font></td></tr></table> + <p><tt># Copyright (c) 2013 The Chromium Authors. All rights reserved.<br> +# Use of this source code is governed by a BSD-style license that can be<br> +# found in the LICENSE file.</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ee77aa"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> + +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> +<td width="100%"><dl> +<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.bounds.html#Bounds">Bounds</a> +</font></dt></dl> +</dd> +</dl> + <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="Bounds">class <strong>Bounds</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> + +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt>Represents a min-max bounds.<br> </tt></td></tr> +<tr><td> </td> +<td width="100%">Methods defined here:<br> +<dl><dt><a name="Bounds-AddBounds"><strong>AddBounds</strong></a>(self, bounds)</dt></dl> + +<dl><dt><a name="Bounds-AddValue"><strong>AddValue</strong></a>(self, value)</dt></dl> + +<dl><dt><a name="Bounds-Reset"><strong>Reset</strong></a>(self)</dt></dl> + +<dl><dt><a name="Bounds-__init__"><strong>__init__</strong></a>(self)</dt></dl> + +<hr> +Static methods defined here:<br> +<dl><dt><a name="Bounds-CompareByMinTimes"><strong>CompareByMinTimes</strong></a>(a, b)</dt></dl> + +<hr> +Data descriptors defined here:<br> +<dl><dt><strong>__dict__</strong></dt> +<dd><tt>dictionary for instance variables (if defined)</tt></dd> +</dl> +<dl><dt><strong>__weakref__</strong></dt> +<dd><tt>list of weak references to the object (if defined)</tt></dd> +</dl> +<dl><dt><strong>bounds</strong></dt> +</dl> +<dl><dt><strong>center</strong></dt> +</dl> +<dl><dt><strong>is_empty</strong></dt> +</dl> +<dl><dt><strong>max</strong></dt> +</dl> +<dl><dt><strong>min</strong></dt> +</dl> +</td></tr></table></td></tr></table> +</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.counter.html b/tools/telemetry/docs/telemetry.core.timeline.counter.html new file mode 100644 index 0000000..a1d19ac --- /dev/null +++ b/tools/telemetry/docs/telemetry.core.timeline.counter.html @@ -0,0 +1,113 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module telemetry.core.timeline.counter</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.counter</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/counter.py">telemetry/core/timeline/counter.py</a></font></td></tr></table> + <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> +# Use of this source code is governed by a BSD-style license that can be<br> +# found in the LICENSE file.</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#aa55cc"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> + +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event_container.html">telemetry.core.timeline.event_container</a><br> +</td><td width="25%" valign=top></td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ee77aa"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> + +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> +<td width="100%"><dl> +<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.counter.html#CounterSample">CounterSample</a> +</font></dt></dl> +</dd> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>(<a href="__builtin__.html#object">__builtin__.object</a>) +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.counter.html#Counter">Counter</a> +</font></dt></dl> +</dd> +</dl> + <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="Counter">class <strong>Counter</strong></a>(<a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>)</font></td></tr> + +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt>Stores all the samples for a given counter.<br> </tt></td></tr> +<tr><td> </td> +<td width="100%"><dl><dt>Method resolution order:</dt> +<dd><a href="telemetry.core.timeline.counter.html#Counter">Counter</a></dd> +<dd><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a></dd> +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> +</dl> +<hr> +Methods defined here:<br> +<dl><dt><a name="Counter-FinalizeImport"><strong>FinalizeImport</strong></a>(self)</dt></dl> + +<dl><dt><a name="Counter-IterChildContainers"><strong>IterChildContainers</strong></a>(self)</dt></dl> + +<dl><dt><a name="Counter-IterEventsInThisContainer"><strong>IterEventsInThisContainer</strong></a>(self)</dt></dl> + +<dl><dt><a name="Counter-__init__"><strong>__init__</strong></a>(self, parent, category, name)</dt></dl> + +<hr> +Data descriptors defined here:<br> +<dl><dt><strong>num_samples</strong></dt> +</dl> +<dl><dt><strong>num_series</strong></dt> +</dl> +<hr> +Data descriptors inherited from <a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>:<br> +<dl><dt><strong>__dict__</strong></dt> +<dd><tt>dictionary for instance variables (if defined)</tt></dd> +</dl> +<dl><dt><strong>__weakref__</strong></dt> +<dd><tt>list of weak references to the object (if defined)</tt></dd> +</dl> +</td></tr></table> <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="CounterSample">class <strong>CounterSample</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> + +<tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> +<td colspan=2><tt># Doesnt' inherit from TimelineEvent because its only a temporary wrapper of a<br> +# counter sample into an event. During stable operation, the samples are stored<br> +# a dense array of values rather than in the long-form done by an Event.<br> </tt></td></tr> +<tr><td> </td> +<td width="100%">Methods defined here:<br> +<dl><dt><a name="CounterSample-__init__"><strong>__init__</strong></a>(self, counter, sample_index)</dt></dl> + +<hr> +Data descriptors defined here:<br> +<dl><dt><strong>__dict__</strong></dt> +<dd><tt>dictionary for instance variables (if defined)</tt></dd> +</dl> +<dl><dt><strong>__weakref__</strong></dt> +<dd><tt>list of weak references to the object (if defined)</tt></dd> +</dl> +<dl><dt><strong>duration</strong></dt> +</dl> +<dl><dt><strong>end</strong></dt> +</dl> +<dl><dt><strong>name</strong></dt> +</dl> +<dl><dt><strong>start</strong></dt> +</dl> +</td></tr></table></td></tr></table> +</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.event.html b/tools/telemetry/docs/telemetry.core.timeline.event.html index f872d98..c5a35d6 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.event.html +++ b/tools/telemetry/docs/telemetry.core.timeline.event.html @@ -37,16 +37,7 @@ <td colspan=2><tt>Represents a timeline event.<br> </tt></td></tr> <tr><td> </td> <td width="100%">Methods defined here:<br> -<dl><dt><a name="TimelineEvent-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="TimelineEvent-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="TimelineEvent-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt><dd><tt>Updates the start time to be the minimum start time of all<br> -child events and the end time to be the maximum end time of all<br> -child events.</tt></dd></dl> - -<dl><dt><a name="TimelineEvent-__init__"><strong>__init__</strong></a>(self, name, start, duration, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>)</dt></dl> +<dl><dt><a name="TimelineEvent-__init__"><strong>__init__</strong></a>(self, category, name, start, duration, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>)</dt></dl> <dl><dt><a name="TimelineEvent-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> @@ -60,8 +51,5 @@ Data descriptors defined here:<br> </dl> <dl><dt><strong>end</strong></dt> </dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.counter.html b/tools/telemetry/docs/telemetry.core.timeline.event_container.html index c4bbf1a..a22803f 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.counter.html +++ b/tools/telemetry/docs/telemetry.core.timeline.event_container.html @@ -1,15 +1,15 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.counter</title> +<html><head><title>Python: module telemetry.core.timeline.event_container</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.counter</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.event_container</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/counter.py">telemetry/core/timeline/tracing/counter.py</a></font></td></tr></table> - <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/event_container.py">telemetry/core/timeline/event_container.py</a></font></td></tr></table> + <p><tt># Copyright (c) 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> <p> @@ -23,7 +23,7 @@ <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.counter.html#Counter">Counter</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">TimelineEventContainer</a> </font></dt></dl> </dd> </dl> @@ -31,15 +31,17 @@ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Counter">class <strong>Counter</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> +<font color="#000000" face="helvetica, arial"><a name="TimelineEventContainer">class <strong>TimelineEventContainer</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> -<td colspan=2><tt>Stores all the samples for a given counter.<br> </tt></td></tr> +<td colspan=2><tt>Represents a container for events.<br> </tt></td></tr> <tr><td> </td> <td width="100%">Methods defined here:<br> -<dl><dt><a name="Counter-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt></dl> +<dl><dt><a name="TimelineEventContainer-IterChildContainers"><strong>IterChildContainers</strong></a>(self)</dt></dl> -<dl><dt><a name="Counter-__init__"><strong>__init__</strong></a>(self, parent, category, name)</dt></dl> +<dl><dt><a name="TimelineEventContainer-IterEventsInThisContainer"><strong>IterEventsInThisContainer</strong></a>(self)</dt></dl> + +<dl><dt><a name="TimelineEventContainer-__init__"><strong>__init__</strong></a>(self, name, parent)</dt></dl> <hr> Data descriptors defined here:<br> @@ -49,13 +51,5 @@ Data descriptors defined here:<br> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list of weak references to the object (if defined)</tt></dd> </dl> -<dl><dt><strong>max_timestamp</strong></dt> -</dl> -<dl><dt><strong>min_timestamp</strong></dt> -</dl> -<dl><dt><strong>num_samples</strong></dt> -</dl> -<dl><dt><strong>num_series</strong></dt> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.html b/tools/telemetry/docs/telemetry.core.timeline.html index 70e203c..fa5ba53 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.html +++ b/tools/telemetry/docs/telemetry.core.timeline.html @@ -17,13 +17,23 @@ <font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event.html">event</a><br> -<a href="telemetry.core.timeline.event_unittest.html">event_unittest</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.importer.html">importer</a><br> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.async_slice.html">async_slice</a><br> +<a href="telemetry.core.timeline.bounds.html">bounds</a><br> +<a href="telemetry.core.timeline.counter.html">counter</a><br> +<a href="telemetry.core.timeline.event.html">event</a><br> +<a href="telemetry.core.timeline.event_container.html">event_container</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.event_unittest.html">event_unittest</a><br> +<a href="telemetry.core.timeline.importer.html">importer</a><br> <a href="telemetry.core.timeline.inspector_importer.html">inspector_importer</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.inspector_importer_unittest.html">inspector_importer_unittest</a><br> +<a href="telemetry.core.timeline.inspector_importer_unittest.html">inspector_importer_unittest</a><br> <a href="telemetry.core.timeline.model.html">model</a><br> </td><td width="25%" valign=top><a href="telemetry.core.timeline.model_unittest.html">model_unittest</a><br> -<a href="telemetry.core.timeline.tracing.html"><strong>tracing</strong> (package)</a><br> +<a href="telemetry.core.timeline.process.html">process</a><br> +<a href="telemetry.core.timeline.sample.html">sample</a><br> +<a href="telemetry.core.timeline.slice.html">slice</a><br> +<a href="telemetry.core.timeline.slice_unittest.html">slice_unittest</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.thread.html">thread</a><br> +<a href="telemetry.core.timeline.trace_event_importer.html">trace_event_importer</a><br> +<a href="telemetry.core.timeline.trace_event_importer_unittest.html">trace_event_importer_unittest</a><br> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.inspector_importer.html b/tools/telemetry/docs/telemetry.core.timeline.inspector_importer.html index f8d78fe..8785ec1 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.inspector_importer.html +++ b/tools/telemetry/docs/telemetry.core.timeline.inspector_importer.html @@ -18,7 +18,7 @@ <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.importer.html">telemetry.core.timeline.importer</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.event.html">telemetry.core.timeline.event</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.thread.html">telemetry.core.timeline.thread</a><br> </td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -56,6 +56,8 @@ Methods defined here:<br> <hr> Static methods defined here:<br> +<dl><dt><a name="InspectorTimelineImporter-AddRawEventToThreadRecursive"><strong>AddRawEventToThreadRecursive</strong></a>(thread, raw_inspector_event)</dt></dl> + <dl><dt><a name="InspectorTimelineImporter-CanImport"><strong>CanImport</strong></a>(event_data)</dt><dd><tt>Checks if event_data is from the inspector timeline. We assume<br> that if the first event is a valid inspector event, we can import the<br> entire list.</tt></dd></dl> diff --git a/tools/telemetry/docs/telemetry.core.timeline.model.html b/tools/telemetry/docs/telemetry.core.timeline.model.html index 34112f7..f9bf748 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.model.html +++ b/tools/telemetry/docs/telemetry.core.timeline.model.html @@ -20,9 +20,11 @@ https://code.google.com/p/trace-viewer/</tt></p> <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.inspector_importer.html">telemetry.core.timeline.inspector_importer</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.trace_event_importer.html">telemetry.core.timeline.tracing.trace_event_importer</a><br> -</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.bounds.html">telemetry.core.timeline.bounds</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.inspector_importer.html">telemetry.core.timeline.inspector_importer</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.trace_event_importer.html">telemetry.core.timeline.trace_event_importer</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.process.html">telemetry.core.timeline.process</a><br> +</td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom> <br> @@ -45,18 +47,22 @@ https://code.google.com/p/trace-viewer/</tt></p> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%">Methods defined here:<br> -<dl><dt><a name="TimelineModel-AddEvent"><strong>AddEvent</strong></a>(self, event)</dt></dl> - -<dl><dt><a name="TimelineModel-DidFinishRecording"><strong>DidFinishRecording</strong></a>(self)</dt></dl> +<dl><dt><a name="TimelineModel-GetAllContainers"><strong>GetAllContainers</strong></a>(self)</dt></dl> <dl><dt><a name="TimelineModel-GetAllEvents"><strong>GetAllEvents</strong></a>(self)</dt></dl> <dl><dt><a name="TimelineModel-GetAllEventsOfName"><strong>GetAllEventsOfName</strong></a>(self, name)</dt></dl> -<dl><dt><a name="TimelineModel-GetRootEvents"><strong>GetRootEvents</strong></a>(self)</dt></dl> +<dl><dt><a name="TimelineModel-GetAllProcesses"><strong>GetAllProcesses</strong></a>(self)</dt></dl> + +<dl><dt><a name="TimelineModel-GetAllThreads"><strong>GetAllThreads</strong></a>(self)</dt></dl> + +<dl><dt><a name="TimelineModel-GetOrCreateProcess"><strong>GetOrCreateProcess</strong></a>(self, pid)</dt></dl> <dl><dt><a name="TimelineModel-ImportTraces"><strong>ImportTraces</strong></a>(self, traces, shift_world_to_zero<font color="#909090">=True</font>)</dt></dl> +<dl><dt><a name="TimelineModel-IterAllEvents"><strong>IterAllEvents</strong></a>(self)</dt></dl> + <dl><dt><a name="TimelineModel-ShiftWorldToZero"><strong>ShiftWorldToZero</strong></a>(self)</dt></dl> <dl><dt><a name="TimelineModel-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt></dl> @@ -71,9 +77,9 @@ Data descriptors defined here:<br> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list of weak references to the object (if defined)</tt></dd> </dl> -<dl><dt><strong>max_timestamp</strong></dt> +<dl><dt><strong>bounds</strong></dt> </dl> -<dl><dt><strong>min_timestamp</strong></dt> +<dl><dt><strong>processes</strong></dt> </dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.process.html b/tools/telemetry/docs/telemetry.core.timeline.process.html index 7cabb81..e834fd0 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.process.html +++ b/tools/telemetry/docs/telemetry.core.timeline.process.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.process</title> +<html><head><title>Python: module telemetry.core.timeline.process</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.process</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.process</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/process.py">telemetry/core/timeline/tracing/process.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/process.py">telemetry/core/timeline/process.py</a></font></td></tr></table> <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> @@ -19,9 +19,9 @@ <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event.html">telemetry.core.timeline.event</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.counter.html">telemetry.core.timeline.tracing.counter</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.thread.html">telemetry.core.timeline.tracing.thread</a><br> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event_container.html">telemetry.core.timeline.event_container</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.counter.html">telemetry.core.timeline.counter</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.thread.html">telemetry.core.timeline.thread</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -30,10 +30,10 @@ <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> <td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>) +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.process.html#Process">Process</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.process.html#Process">Process</a> </font></dt></dl> </dd> </dl> @@ -41,18 +41,20 @@ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Process">class <strong>Process</strong></a>(<a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>)</font></td></tr> +<font color="#000000" face="helvetica, arial"><a name="Process">class <strong>Process</strong></a>(<a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>)</font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>The <a href="#Process">Process</a> represents a single userland process in the trace.<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.process.html#Process">Process</a></dd> -<dd><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a></dd> +<dd><a href="telemetry.core.timeline.process.html#Process">Process</a></dd> +<dd><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> <hr> Methods defined here:<br> +<dl><dt><a name="Process-AutoCloseOpenSlices"><strong>AutoCloseOpenSlices</strong></a>(self, max_timestamp)</dt></dl> + <dl><dt><a name="Process-FinalizeImport"><strong>FinalizeImport</strong></a>(self)</dt></dl> <dl><dt><a name="Process-GetCounter"><strong>GetCounter</strong></a>(self, category, name)</dt></dl> @@ -61,11 +63,11 @@ Methods defined here:<br> <dl><dt><a name="Process-GetOrCreateThread"><strong>GetOrCreateThread</strong></a>(self, tid)</dt></dl> -<dl><dt><a name="Process-GetThreadWithId"><strong>GetThreadWithId</strong></a>(self, tid)</dt></dl> +<dl><dt><a name="Process-IterChildContainers"><strong>IterChildContainers</strong></a>(self)</dt></dl> -<dl><dt><a name="Process-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt></dl> +<dl><dt><a name="Process-IterEventsInThisContainer"><strong>IterEventsInThisContainer</strong></a>(self)</dt></dl> -<dl><dt><a name="Process-__init__"><strong>__init__</strong></a>(self, pid)</dt></dl> +<dl><dt><a name="Process-__init__"><strong>__init__</strong></a>(self, parent, pid)</dt></dl> <hr> Data descriptors defined here:<br> @@ -74,26 +76,12 @@ Data descriptors defined here:<br> <dl><dt><strong>threads</strong></dt> </dl> <hr> -Methods inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> -<dl><dt><a name="Process-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="Process-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="Process-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> - -<hr> -Data descriptors inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> +Data descriptors inherited from <a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>dictionary for instance variables (if defined)</tt></dd> </dl> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list of weak references to the object (if defined)</tt></dd> </dl> -<dl><dt><strong>end</strong></dt> -</dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.sample.html b/tools/telemetry/docs/telemetry.core.timeline.sample.html index f48d15b..82e93fd 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.sample.html +++ b/tools/telemetry/docs/telemetry.core.timeline.sample.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.sample</title> +<html><head><title>Python: module telemetry.core.timeline.sample</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.sample</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.sample</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/sample.py">telemetry/core/timeline/tracing/sample.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/sample.py">telemetry/core/timeline/sample.py</a></font></td></tr></table> <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> @@ -31,7 +31,7 @@ <dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.sample.html#Sample">Sample</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.sample.html#Sample">Sample</a> </font></dt></dl> </dd> </dl> @@ -51,7 +51,7 @@ Slice. These must be kept in sync.<br> All time units are stored in milliseconds.<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.sample.html#Sample">Sample</a></dd> +<dd><a href="telemetry.core.timeline.sample.html#Sample">Sample</a></dd> <dd><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> @@ -61,15 +61,6 @@ Methods defined here:<br> <hr> Methods inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> -<dl><dt><a name="Sample-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="Sample-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="Sample-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt><dd><tt>Updates the start time to be the minimum start time of all<br> -child events and the end time to be the maximum end time of all<br> -child events.</tt></dd></dl> - <dl><dt><a name="Sample-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> <hr> @@ -82,8 +73,5 @@ Data descriptors inherited from <a href="telemetry.core.timeline.event.html#Time </dl> <dl><dt><strong>end</strong></dt> </dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.slice.html b/tools/telemetry/docs/telemetry.core.timeline.slice.html index 2e91824..9239b5d 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.slice.html +++ b/tools/telemetry/docs/telemetry.core.timeline.slice.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.slice</title> +<html><head><title>Python: module telemetry.core.timeline.slice</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.slice</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.slice</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/slice.py">telemetry/core/timeline/tracing/slice.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/slice.py">telemetry/core/timeline/slice.py</a></font></td></tr></table> <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> @@ -31,7 +31,7 @@ <dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.slice.html#Slice">Slice</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.slice.html#Slice">Slice</a> </font></dt></dl> </dd> </dl> @@ -51,7 +51,7 @@ NOTE: The Sample class implements the same in All time units are stored in milliseconds.<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.slice.html#Slice">Slice</a></dd> +<dd><a href="telemetry.core.timeline.slice.html#Slice">Slice</a></dd> <dd><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> @@ -61,23 +61,19 @@ Methods defined here:<br> <dl><dt><a name="Slice-GetAllSubSlices"><strong>GetAllSubSlices</strong></a>(self)</dt></dl> -<dl><dt><a name="Slice-__init__"><strong>__init__</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>)</dt></dl> +<dl><dt><a name="Slice-GetAllSubSlicesOfName"><strong>GetAllSubSlicesOfName</strong></a>(self, name)</dt></dl> + +<dl><dt><a name="Slice-IterEventsInThisContainerRecrusively"><strong>IterEventsInThisContainerRecrusively</strong></a>(self)</dt></dl> + +<dl><dt><a name="Slice-__init__"><strong>__init__</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>, parent<font color="#909090">=None</font>, duration<font color="#909090">=0</font>)</dt></dl> <hr> Data descriptors defined here:<br> -<dl><dt><strong>sub_slices</strong></dt> +<dl><dt><strong>self_time</strong></dt> +<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> </dl> <hr> Methods inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> -<dl><dt><a name="Slice-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="Slice-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="Slice-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt><dd><tt>Updates the start time to be the minimum start time of all<br> -child events and the end time to be the maximum end time of all<br> -child events.</tt></dd></dl> - <dl><dt><a name="Slice-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> <hr> @@ -90,8 +86,5 @@ Data descriptors inherited from <a href="telemetry.core.timeline.event.html#Time </dl> <dl><dt><strong>end</strong></dt> </dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.thread.html b/tools/telemetry/docs/telemetry.core.timeline.thread.html index 8fe688d..081f2ee 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.thread.html +++ b/tools/telemetry/docs/telemetry.core.timeline.thread.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.thread</title> +<html><head><title>Python: module telemetry.core.timeline.thread</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.thread</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.thread</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/thread.py">telemetry/core/timeline/tracing/thread.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/thread.py">telemetry/core/timeline/thread.py</a></font></td></tr></table> <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> # Use of this source code is governed by a BSD-style license that can be<br> # found in the LICENSE file.</tt></p> @@ -19,9 +19,9 @@ <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event.html">telemetry.core.timeline.event</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.sample.html">telemetry.core.timeline.tracing.sample</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.slice.html">telemetry.core.timeline.tracing.slice</a><br> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.event_container.html">telemetry.core.timeline.event_container</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.sample.html">telemetry.core.timeline.sample</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.slice.html">telemetry.core.timeline.slice</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -30,10 +30,10 @@ <tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> <td width="100%"><dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>(<a href="__builtin__.html#object">__builtin__.object</a>) +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.thread.html#Thread">Thread</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.thread.html#Thread">Thread</a> </font></dt></dl> </dd> </dl> @@ -41,7 +41,7 @@ <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom> <br> -<font color="#000000" face="helvetica, arial"><a name="Thread">class <strong>Thread</strong></a>(<a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>)</font></td></tr> +<font color="#000000" face="helvetica, arial"><a name="Thread">class <strong>Thread</strong></a>(<a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>)</font></td></tr> <tr bgcolor="#ffc8d8"><td rowspan=2><tt> </tt></td> <td colspan=2><tt>A <a href="#Thread">Thread</a> stores all the trace events collected for a particular<br> @@ -50,8 +50,8 @@ subrow 0 has all the root slices, subrow  The asynchronous slices are stored in an AsyncSliceGroup object.<br> </tt></td></tr> <tr><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.thread.html#Thread">Thread</a></dd> -<dd><a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a></dd> +<dd><a href="telemetry.core.timeline.thread.html#Thread">Thread</a></dd> +<dd><a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> <hr> @@ -60,7 +60,7 @@ Methods defined here:<br> <dl><dt><a name="Thread-AddSample"><strong>AddSample</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>)</dt></dl> -<dl><dt><a name="Thread-AutoCloseOpenSlices"><strong>AutoCloseOpenSlices</strong></a>(self, max_timestamp<font color="#909090">=None</font>)</dt></dl> +<dl><dt><a name="Thread-AutoCloseOpenSlices"><strong>AutoCloseOpenSlices</strong></a>(self, max_timestamp)</dt></dl> <dl><dt><a name="Thread-BeginSlice"><strong>BeginSlice</strong></a>(self, category, name, timestamp, args<font color="#909090">=None</font>)</dt><dd><tt>Opens a new slice for the thread.<br> Calls to beginSlice and endSlice must be made with<br> @@ -84,43 +84,35 @@ returns completed slice.</tt></dd></dl> <dl><dt><a name="Thread-IsTimestampValidForBeginOrEnd"><strong>IsTimestampValidForBeginOrEnd</strong></a>(self, timestamp)</dt></dl> -<dl><dt><a name="Thread-PushSlice"><strong>PushSlice</strong></a>(self, new_slice)</dt></dl> +<dl><dt><a name="Thread-IterAllSlices"><strong>IterAllSlices</strong></a>(self)</dt></dl> + +<dl><dt><a name="Thread-IterChildContainers"><strong>IterChildContainers</strong></a>(self)</dt></dl> + +<dl><dt><a name="Thread-IterEventsInThisContainer"><strong>IterEventsInThisContainer</strong></a>(self)</dt></dl> -<dl><dt><a name="Thread-UpdateBounds"><strong>UpdateBounds</strong></a>(self)</dt></dl> +<dl><dt><a name="Thread-PushSlice"><strong>PushSlice</strong></a>(self, new_slice)</dt></dl> <dl><dt><a name="Thread-__init__"><strong>__init__</strong></a>(self, process, tid)</dt></dl> <hr> Data descriptors defined here:<br> +<dl><dt><strong>all_slices</strong></dt> +</dl> <dl><dt><strong>async_slices</strong></dt> </dl> <dl><dt><strong>open_slice_count</strong></dt> </dl> <dl><dt><strong>samples</strong></dt> </dl> -<dl><dt><strong>slices</strong></dt> +<dl><dt><strong>toplevel_slices</strong></dt> </dl> <hr> -Methods inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> -<dl><dt><a name="Thread-GetAllChildrenRecursive"><strong>GetAllChildrenRecursive</strong></a>(self, include_self<font color="#909090">=False</font>)</dt></dl> - -<dl><dt><a name="Thread-ShiftTimestampsForward"><strong>ShiftTimestampsForward</strong></a>(self, delta_time)</dt><dd><tt>Shifts start time of event by delta_time and also<br> -recursively shifts child events.</tt></dd></dl> - -<dl><dt><a name="Thread-__repr__"><strong>__repr__</strong></a>(self)</dt></dl> - -<hr> -Data descriptors inherited from <a href="telemetry.core.timeline.event.html#TimelineEvent">telemetry.core.timeline.event.TimelineEvent</a>:<br> +Data descriptors inherited from <a href="telemetry.core.timeline.event_container.html#TimelineEventContainer">telemetry.core.timeline.event_container.TimelineEventContainer</a>:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>dictionary for instance variables (if defined)</tt></dd> </dl> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list of weak references to the object (if defined)</tt></dd> </dl> -<dl><dt><strong>end</strong></dt> -</dl> -<dl><dt><strong>self_time</strong></dt> -<dd><tt>Time spent in this function less any time spent in child events.</tt></dd> -</dl> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.trace_event_importer.html b/tools/telemetry/docs/telemetry.core.timeline.trace_event_importer.html index e519498..6f005aa 100644 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.trace_event_importer.html +++ b/tools/telemetry/docs/telemetry.core.timeline.trace_event_importer.html @@ -1,14 +1,14 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: module telemetry.core.timeline.tracing.trace_event_importer</title> +<html><head><title>Python: module telemetry.core.timeline.trace_event_importer</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.<a href="telemetry.core.timeline.tracing.html"><font color="#ffffff">tracing</font></a>.trace_event_importer</strong></big></big></font></td +<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.trace_event_importer</strong></big></big></font></td ><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/trace_event_importer.py">telemetry/core/timeline/tracing/trace_event_importer.py</a></font></td></tr></table> +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/trace_event_importer.py">telemetry/core/timeline/trace_event_importer.py</a></font></td></tr></table> <p><tt>TraceEventImporter imports TraceEvent-formatted data<br> into the provided model.<br> This is a port of the trace event importer from<br> @@ -24,8 +24,7 @@ https://code.google.com/p/trace-viewer/</tt></p> <a href="telemetry.core.timeline.importer.html">telemetry.core.timeline.importer</a><br> </td><td width="25%" valign=top><a href="json.html">json</a><br> <a href="re.html">re</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.async_slice.html">telemetry.core.timeline.tracing.async_slice</a><br> -<a href="telemetry.core.timeline.tracing.process.html">telemetry.core.timeline.tracing.process</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.timeline.async_slice.html">telemetry.core.timeline.async_slice</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> @@ -37,7 +36,7 @@ https://code.google.com/p/trace-viewer/</tt></p> <dt><font face="helvetica, arial"><a href="telemetry.core.timeline.importer.html#TimelineImporter">telemetry.core.timeline.importer.TimelineImporter</a>(<a href="__builtin__.html#object">__builtin__.object</a>) </font></dt><dd> <dl> -<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.tracing.trace_event_importer.html#TraceEventTimelineImporter">TraceEventTimelineImporter</a> +<dt><font face="helvetica, arial"><a href="telemetry.core.timeline.trace_event_importer.html#TraceEventTimelineImporter">TraceEventTimelineImporter</a> </font></dt></dl> </dd> </dl> @@ -49,7 +48,7 @@ https://code.google.com/p/trace-viewer/</tt></p> <tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> <td width="100%"><dl><dt>Method resolution order:</dt> -<dd><a href="telemetry.core.timeline.tracing.trace_event_importer.html#TraceEventTimelineImporter">TraceEventTimelineImporter</a></dd> +<dd><a href="telemetry.core.timeline.trace_event_importer.html#TraceEventTimelineImporter">TraceEventTimelineImporter</a></dd> <dd><a href="telemetry.core.timeline.importer.html#TimelineImporter">telemetry.core.timeline.importer.TimelineImporter</a></dd> <dd><a href="__builtin__.html#object">__builtin__.object</a></dd> </dl> diff --git a/tools/telemetry/docs/telemetry.core.timeline.tracing.html b/tools/telemetry/docs/telemetry.core.timeline.tracing.html deleted file mode 100644 index 2e00fff..0000000 --- a/tools/telemetry/docs/telemetry.core.timeline.tracing.html +++ /dev/null @@ -1,31 +0,0 @@ - -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> -<html><head><title>Python: package telemetry.core.timeline.tracing</title> -</head><body bgcolor="#f0f0f8"> - -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> -<tr bgcolor="#7799ee"> -<td valign=bottom> <br> -<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>.<a href="telemetry.core.timeline.html"><font color="#ffffff">timeline</font></a>.tracing</strong></big></big></font></td -><td align=right valign=bottom -><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/core/timeline/tracing/__init__.py">telemetry/core/timeline/tracing/__init__.py</a></font></td></tr></table> - <p><tt># Copyright 2013 The Chromium Authors. All rights reserved.<br> -# Use of this source code is governed by a BSD-style license that can be<br> -# found in the LICENSE file.</tt></p> -<p> -<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> -<tr bgcolor="#aa55cc"> -<td colspan=3 valign=bottom> <br> -<font color="#ffffff" face="helvetica, arial"><big><strong>Package Contents</strong></big></font></td></tr> - -<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> -<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.async_slice.html">async_slice</a><br> -<a href="telemetry.core.timeline.tracing.counter.html">counter</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.process.html">process</a><br> -<a href="telemetry.core.timeline.tracing.sample.html">sample</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.slice.html">slice</a><br> -<a href="telemetry.core.timeline.tracing.thread.html">thread</a><br> -</td><td width="25%" valign=top><a href="telemetry.core.timeline.tracing.trace_event_importer.html">trace_event_importer</a><br> -<a href="telemetry.core.timeline.tracing.trace_event_importer_unittest.html">trace_event_importer_unittest</a><br> -</td></tr></table></td></tr></table> -</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.user_agent.html b/tools/telemetry/docs/telemetry.core.user_agent.html index 02f4bb9..22e359f 100644 --- a/tools/telemetry/docs/telemetry.core.user_agent.html +++ b/tools/telemetry/docs/telemetry.core.user_agent.html @@ -29,5 +29,5 @@ https://developers.google.com/chrome/mobile/docs/user-agent</tt></dd></dl> <font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr> <tr><td bgcolor="#55aa55"><tt> </tt></td><td> </td> -<td width="100%"><strong>UA_TYPE_MAPPING</strong> = {'desktop': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) A...TML, like Gecko) Chrome/25.0.1364.2 Safari/537.22', 'mobile': 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus ... Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19', 'tablet': 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus ...L, like Gecko) Chrome/18.0.1025.133 Safari/535.19'}</td></tr></table> +<td width="100%"><strong>UA_TYPE_MAPPING</strong> = {'desktop': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) A...L, like Gecko) Chrome/27.0.1453.111 Safari/537.22', 'mobile': 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus ... Gecko) Chrome/27.0.1453.111 Mobile Safari/535.19', 'tablet': 'Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus ...L, like Gecko) Chrome/27.0.1453.111 Safari/535.19'}</td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.core.wpr_server.html b/tools/telemetry/docs/telemetry.core.wpr_server.html index 14476eb..4cfd8ca 100644 --- a/tools/telemetry/docs/telemetry.core.wpr_server.html +++ b/tools/telemetry/docs/telemetry.core.wpr_server.html @@ -52,7 +52,7 @@ <dl><dt><a name="ReplayServer-__exit__"><strong>__exit__</strong></a>(self, *args)</dt></dl> -<dl><dt><a name="ReplayServer-__init__"><strong>__init__</strong></a>(self, browser_backend, path, is_record_mode, is_append_mode, webpagereplay_host, webpagereplay_local_http_port, webpagereplay_local_https_port, webpagereplay_remote_http_port, webpagereplay_remote_https_port)</dt></dl> +<dl><dt><a name="ReplayServer-__init__"><strong>__init__</strong></a>(self, browser_backend, path, is_record_mode, is_append_mode, make_javascript_deterministic, webpagereplay_host, webpagereplay_local_http_port, webpagereplay_local_https_port, webpagereplay_remote_http_port, webpagereplay_remote_https_port)</dt></dl> <hr> Data descriptors defined here:<br> diff --git a/tools/telemetry/docs/telemetry.html b/tools/telemetry/docs/telemetry.html index 127eb86..5b75b23 100644 --- a/tools/telemetry/docs/telemetry.html +++ b/tools/telemetry/docs/telemetry.html @@ -75,18 +75,20 @@ the browser. Or better yet:<br> <td width="100%">Methods defined here:<br> <dl><dt><a name="Browser-Close"><strong>Close</strong></a>(self)</dt><dd><tt>Closes this browser.</tt></dd></dl> +<dl><dt><a name="Browser-GetStackTrace"><strong>GetStackTrace</strong></a>(self)</dt></dl> + <dl><dt><a name="Browser-GetStandardOutput"><strong>GetStandardOutput</strong></a>(self)</dt></dl> <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> <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> -<dl><dt><a name="Browser-SetReplayArchivePath"><strong>SetReplayArchivePath</strong></a>(self, archive_path, append_to_existing_wpr<font color="#909090">=False</font>)</dt></dl> +<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> <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> |base_output_file|.<process_name>.</tt></dd></dl> -<dl><dt><a name="Browser-StartTracing"><strong>StartTracing</strong></a>(self, custom_categories<font color="#909090">=None</font>)</dt></dl> +<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> <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> diff --git a/tools/telemetry/docs/telemetry.page.actions.html b/tools/telemetry/docs/telemetry.page.actions.html index a9733e2..ae1c953 100644 --- a/tools/telemetry/docs/telemetry.page.actions.html +++ b/tools/telemetry/docs/telemetry.page.actions.html @@ -22,10 +22,12 @@ <a href="telemetry.page.actions.click_element_unittest.html">click_element_unittest</a><br> </td><td width="25%" valign=top><a href="telemetry.page.actions.js_collect_garbage.html">js_collect_garbage</a><br> <a href="telemetry.page.actions.page_action.html">page_action</a><br> +<a href="telemetry.page.actions.play.html">play</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.actions.play_unittest.html">play_unittest</a><br> <a href="telemetry.page.actions.reload.html">reload</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.actions.scroll.html">scroll</a><br> -<a href="telemetry.page.actions.scroll_unittest.html">scroll_unittest</a><br> +<a href="telemetry.page.actions.scroll.html">scroll</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.actions.scroll_unittest.html">scroll_unittest</a><br> <a href="telemetry.page.actions.wait.html">wait</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.actions.wait_unittest.html">wait_unittest</a><br> +<a href="telemetry.page.actions.wait_unittest.html">wait_unittest</a><br> </td></tr></table></td></tr></table> </body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.page.actions.play.html b/tools/telemetry/docs/telemetry.page.actions.play.html new file mode 100644 index 0000000..88ece24 --- /dev/null +++ b/tools/telemetry/docs/telemetry.page.actions.play.html @@ -0,0 +1,107 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module telemetry.page.actions.play</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.page.html"><font color="#ffffff">page</font></a>.<a href="telemetry.page.actions.html"><font color="#ffffff">actions</font></a>.play</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/page/actions/play.py">telemetry/page/actions/play.py</a></font></td></tr></table> + <p><tt>A Telemetry page_action that performs the "play" action on media elements.<br> + <br> +Media elements can be specified by a selector attribute. If no selector is<br> +defined then then the action attempts to play the first video element or audio<br> +element on the page. A selector can also be 'all' to play all media elements.<br> + <br> +Other attributes to use are: wait_for_playing and wait_for_ended, which forces<br> +the action to wait until playing and ended events get fired respectively.</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#aa55cc"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> + +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> +</td><td width="25%" valign=top><a href="os.html">os</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.actions.page_action.html">telemetry.page.actions.page_action</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.util.html">telemetry.core.util</a><br> +</td></tr></table></td></tr></table><p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ee77aa"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> + +<tr><td bgcolor="#ee77aa"><tt> </tt></td><td> </td> +<td width="100%"><dl> +<dt><font face="helvetica, arial"><a href="telemetry.page.actions.page_action.html#PageAction">telemetry.page.actions.page_action.PageAction</a>(<a href="__builtin__.html#object">__builtin__.object</a>) +</font></dt><dd> +<dl> +<dt><font face="helvetica, arial"><a href="telemetry.page.actions.play.html#PlayAction">PlayAction</a> +</font></dt></dl> +</dd> +</dl> + <p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#ffc8d8"> +<td colspan=3 valign=bottom> <br> +<font color="#000000" face="helvetica, arial"><a name="PlayAction">class <strong>PlayAction</strong></a>(<a href="telemetry.page.actions.page_action.html#PageAction">telemetry.page.actions.page_action.PageAction</a>)</font></td></tr> + +<tr><td bgcolor="#ffc8d8"><tt> </tt></td><td> </td> +<td width="100%"><dl><dt>Method resolution order:</dt> +<dd><a href="telemetry.page.actions.play.html#PlayAction">PlayAction</a></dd> +<dd><a href="telemetry.page.actions.page_action.html#PageAction">telemetry.page.actions.page_action.PageAction</a></dd> +<dd><a href="__builtin__.html#object">__builtin__.object</a></dd> +</dl> +<hr> +Methods defined here:<br> +<dl><dt><a name="PlayAction-HasEventCompleted"><strong>HasEventCompleted</strong></a>(self, tab, selector, event_name)</dt></dl> + +<dl><dt><a name="PlayAction-RunAction"><strong>RunAction</strong></a>(self, page, tab, previous_action)</dt></dl> + +<dl><dt><a name="PlayAction-WaitForEvent"><strong>WaitForEvent</strong></a>(self, tab, selector, event_name, timeout)</dt><dd><tt>Halts play action until the selector's event is fired.</tt></dd></dl> + +<dl><dt><a name="PlayAction-WillRunAction"><strong>WillRunAction</strong></a>(self, page, tab)</dt><dd><tt>Load the media metrics JS code prior to running the action.</tt></dd></dl> + +<dl><dt><a name="PlayAction-__init__"><strong>__init__</strong></a>(self, attributes<font color="#909090">=None</font>)</dt></dl> + +<hr> +Methods inherited from <a href="telemetry.page.actions.page_action.html#PageAction">telemetry.page.actions.page_action.PageAction</a>:<br> +<dl><dt><a name="PlayAction-BindMeasurementJavaScript"><strong>BindMeasurementJavaScript</strong></a>(self, tab, start_js, stop_js)</dt><dd><tt>Let this action determine when measurements should start and stop.<br> + <br> +A measurement can call this method to provide the action<br> +with JavaScript code that starts and stops measurements. The action<br> +determines when to execute the provided JavaScript code, for more accurate<br> +timings.<br> + <br> +Args:<br> + tab: The tab to do everything on.<br> + start_js: JavaScript code that starts measurements.<br> + stop_js: JavaScript code that stops measurements.</tt></dd></dl> + +<dl><dt><a name="PlayAction-CanBeBound"><strong>CanBeBound</strong></a>(self)</dt><dd><tt>If this class implements BindMeasurementJavaScript, override CanBeBound<br> +to return True so that a test knows it can bind measurements.</tt></dd></dl> + +<dl><dt><a name="PlayAction-CleanUp"><strong>CleanUp</strong></a>(self, page, tab)</dt></dl> + +<dl><dt><a name="PlayAction-CustomizeBrowserOptions"><strong>CustomizeBrowserOptions</strong></a>(self, options)</dt><dd><tt>Override to add action-specific options to the BrowserOptions<br> +object.</tt></dd></dl> + +<dl><dt><a name="PlayAction-RunsPreviousAction"><strong>RunsPreviousAction</strong></a>(self)</dt><dd><tt>Some actions require some initialization to be performed before the<br> +previous action. For example, wait for href change needs to record the old<br> +href before the previous action changes it. Therefore, we allow actions to<br> +run the previous action. An action that does this should override this to<br> +return True in order to prevent the previous action from being run twice.</tt></dd></dl> + +<hr> +Data descriptors inherited from <a href="telemetry.page.actions.page_action.html#PageAction">telemetry.page.actions.page_action.PageAction</a>:<br> +<dl><dt><strong>__dict__</strong></dt> +<dd><tt>dictionary for instance variables (if defined)</tt></dd> +</dl> +<dl><dt><strong>__weakref__</strong></dt> +<dd><tt>list of weak references to the object (if defined)</tt></dd> +</dl> +</td></tr></table></td></tr></table> +</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.page.cloud_storage.html b/tools/telemetry/docs/telemetry.page.cloud_storage.html new file mode 100644 index 0000000..153583d --- /dev/null +++ b/tools/telemetry/docs/telemetry.page.cloud_storage.html @@ -0,0 +1,40 @@ + +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html><head><title>Python: module telemetry.page.cloud_storage</title> +</head><body bgcolor="#f0f0f8"> + +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> +<tr bgcolor="#7799ee"> +<td valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"> <br><big><big><strong><a href="telemetry.html"><font color="#ffffff">telemetry</font></a>.<a href="telemetry.page.html"><font color="#ffffff">page</font></a>.cloud_storage</strong></big></big></font></td +><td align=right valign=bottom +><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="../telemetry/page/cloud_storage.py">telemetry/page/cloud_storage.py</a></font></td></tr></table> + <p><tt>Wrappers for gsutil, for basic interaction with Google Cloud Storage.</tt></p> +<p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#aa55cc"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> + +<tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> +<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cStringIO.html">cStringIO</a><br> +<a href="logging.html">logging</a><br> +</td><td width="25%" valign=top><a href="os.html">os</a><br> +<a href="subprocess.html">subprocess</a><br> +</td><td width="25%" valign=top><a href="sys.html">sys</a><br> +<a href="tarfile.html">tarfile</a><br> +</td><td width="25%" valign=top><a href="urllib2.html">urllib2</a><br> +<a href="telemetry.core.util.html">telemetry.core.util</a><br> +</td></tr></table></td></tr></table><p> +<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> +<tr bgcolor="#eeaa77"> +<td colspan=3 valign=bottom> <br> +<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr> + +<tr><td bgcolor="#eeaa77"><tt> </tt></td><td> </td> +<td width="100%"><dl><dt><a name="-Delete"><strong>Delete</strong></a>(bucket, remote_path)</dt></dl> + <dl><dt><a name="-Get"><strong>Get</strong></a>(bucket, remote_path, local_path)</dt></dl> + <dl><dt><a name="-Insert"><strong>Insert</strong></a>(bucket, remote_path, local_path)</dt></dl> + <dl><dt><a name="-List"><strong>List</strong></a>(bucket)</dt></dl> +</td></tr></table> +</body></html>
\ No newline at end of file diff --git a/tools/telemetry/docs/telemetry.page.html b/tools/telemetry/docs/telemetry.page.html index 04fdf52..28b1343 100644 --- a/tools/telemetry/docs/telemetry.page.html +++ b/tools/telemetry/docs/telemetry.page.html @@ -24,26 +24,27 @@ <a href="telemetry.page.block_page_measurement_results_unittest.html">block_page_measurement_results_unittest</a><br> <a href="telemetry.page.buildbot_page_measurement_results.html">buildbot_page_measurement_results</a><br> <a href="telemetry.page.buildbot_page_measurement_results_unittest.html">buildbot_page_measurement_results_unittest</a><br> +<a href="telemetry.page.cloud_storage.html">cloud_storage</a><br> <a href="telemetry.page.csv_page_measurement_results.html">csv_page_measurement_results</a><br> <a href="telemetry.page.csv_page_measurement_results_unittest.html">csv_page_measurement_results_unittest</a><br> -<a href="telemetry.page.gtest_test_results.html">gtest_test_results</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.page.html">page</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.gtest_test_results.html">gtest_test_results</a><br> +<a href="telemetry.page.page.html">page</a><br> <a href="telemetry.page.page_filter.html">page_filter</a><br> <a href="telemetry.page.page_measurement.html">page_measurement</a><br> <a href="telemetry.page.page_measurement_results.html">page_measurement_results</a><br> <a href="telemetry.page.page_measurement_results_unittest.html">page_measurement_results_unittest</a><br> <a href="telemetry.page.page_measurement_runner.html">page_measurement_runner</a><br> <a href="telemetry.page.page_measurement_unittest.html">page_measurement_unittest</a><br> -<a href="telemetry.page.page_measurement_unittest_base.html">page_measurement_unittest_base</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.page_measurement_value.html">page_measurement_value</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.page_measurement_unittest_base.html">page_measurement_unittest_base</a><br> +<a href="telemetry.page.page_measurement_value.html">page_measurement_value</a><br> <a href="telemetry.page.page_runner.html">page_runner</a><br> <a href="telemetry.page.page_runner_unittest.html">page_runner_unittest</a><br> <a href="telemetry.page.page_set.html">page_set</a><br> <a href="telemetry.page.page_set_archive_info.html">page_set_archive_info</a><br> <a href="telemetry.page.page_set_archive_info_unittest.html">page_set_archive_info_unittest</a><br> <a href="telemetry.page.page_set_unittest.html">page_set_unittest</a><br> -<a href="telemetry.page.page_test.html">page_test</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.page_test_results.html">page_test_results</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.page_test.html">page_test</a><br> +<a href="telemetry.page.page_test_results.html">page_test_results</a><br> <a href="telemetry.page.page_test_runner.html">page_test_runner</a><br> <a href="telemetry.page.page_test_unittest.html">page_test_unittest</a><br> <a href="telemetry.page.page_unittest.html">page_unittest</a><br> diff --git a/tools/telemetry/docs/telemetry.page.page_runner.html b/tools/telemetry/docs/telemetry.page.page_runner.html index 8863dc7..7bcba13 100644 --- a/tools/telemetry/docs/telemetry.page.page_runner.html +++ b/tools/telemetry/docs/telemetry.page.page_runner.html @@ -20,15 +20,15 @@ <tr><td bgcolor="#aa55cc"><tt> </tt></td><td> </td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.browser_finder.html">telemetry.core.browser_finder</a><br> -<a href="codecs.html">codecs</a><br> <a href="telemetry.core.exceptions.html">telemetry.core.exceptions</a><br> <a href="glob.html">glob</a><br> -</td><td width="25%" valign=top><a href="logging.html">logging</a><br> -<a href="os.html">os</a><br> +<a href="logging.html">logging</a><br> +</td><td width="25%" valign=top><a href="os.html">os</a><br> <a href="telemetry.page.page_filter.html">telemetry.page.page_filter</a><br> <a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> -</td><td width="25%" valign=top><a href="random.html">random</a><br> -<a href="sys.html">sys</a><br> +<a href="random.html">random</a><br> +</td><td width="25%" valign=top><a href="sys.html">sys</a><br> +<a href="tempfile.html">tempfile</a><br> <a href="time.html">time</a><br> <a href="traceback.html">traceback</a><br> </td><td width="25%" valign=top><a href="urlparse.html">urlparse</a><br> diff --git a/tools/telemetry/docs/telemetry.page.record_wpr.html b/tools/telemetry/docs/telemetry.page.record_wpr.html index fa49426..a82922f 100644 --- a/tools/telemetry/docs/telemetry.page.record_wpr.html +++ b/tools/telemetry/docs/telemetry.page.record_wpr.html @@ -22,15 +22,16 @@ <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="telemetry.core.browser_options.html">telemetry.core.browser_options</a><br> <a href="telemetry.core.discover.html">telemetry.core.discover</a><br> <a href="logging.html">logging</a><br> -</td><td width="25%" valign=top><a href="os.html">os</a><br> -<a href="telemetry.page.page_measurement.html">telemetry.page.page_measurement</a><br> +<a href="os.html">os</a><br> +</td><td width="25%" valign=top><a href="telemetry.page.page_measurement.html">telemetry.page.page_measurement</a><br> <a href="telemetry.page.page_runner.html">telemetry.page.page_runner</a><br> -</td><td width="25%" valign=top><a href="telemetry.page.page_set.html">telemetry.page.page_set</a><br> +<a href="telemetry.page.page_set.html">telemetry.page.page_set</a><br> <a href="telemetry.page.page_test.html">telemetry.page.page_test</a><br> -<a href="sys.html">sys</a><br> -</td><td width="25%" valign=top><a href="tempfile.html">tempfile</a><br> +</td><td width="25%" valign=top><a href="sys.html">sys</a><br> +<a href="tempfile.html">tempfile</a><br> +<a href="telemetry.test.html">telemetry.test</a><br> <a href="time.html">time</a><br> -<a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br> +</td><td width="25%" valign=top><a href="telemetry.core.wpr_modes.html">telemetry.core.wpr_modes</a><br> </td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> diff --git a/tools/telemetry/telemetry/core/chrome/tracing_backend.py b/tools/telemetry/telemetry/core/chrome/tracing_backend.py index 644544c..2df0f6b 100644 --- a/tools/telemetry/telemetry/core/chrome/tracing_backend.py +++ b/tools/telemetry/telemetry/core/chrome/tracing_backend.py @@ -43,7 +43,9 @@ class TraceResultImpl(object): def AsTimelineModel(self): f = cStringIO.StringIO() self.Serialize(f) - return model.TimelineModel(event_data=f.getvalue()) + return model.TimelineModel( + event_data=f.getvalue(), + shift_world_to_zero=False) class TracingBackend(object): def __init__(self, devtools_port): diff --git a/tools/telemetry/telemetry/core/timeline/tracing/async_slice.py b/tools/telemetry/telemetry/core/timeline/async_slice.py index 03031c1..140eadc 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/async_slice.py +++ b/tools/telemetry/telemetry/core/timeline/async_slice.py @@ -2,20 +2,27 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import telemetry.core.timeline.tracing.slice as tracing_slice +import telemetry.core.timeline.event as event -class AsyncSlice(tracing_slice.Slice): +class AsyncSlice(event.TimelineEvent): ''' A AsyncSlice represents an interval of time during which an asynchronous operation is in progress. An AsyncSlice consumes no CPU time itself and so is only associated with Threads at its start and end point. ''' - def __init__(self, category, name, timestamp, args=None, parent=None): + def __init__(self, category, name, timestamp, args=None): super(AsyncSlice, self).__init__( - category, name, timestamp, args=args, parent=parent) + category, name, timestamp, duration=0, args=args) + self.parent_slice = None self.start_thread = None self.end_thread = None + self.sub_slices = [] self.id = None def AddSubSlice(self, sub_slice): - super(AsyncSlice, self).AddSubSlice(sub_slice) - self.children.append(sub_slice) + assert sub_slice.parent_slice == self + self.sub_slices.append(sub_slice) + + + def IterEventsInThisContainerRecrusively(self): + for sub_slice in self.sub_slices: + yield sub_slice diff --git a/tools/telemetry/telemetry/core/timeline/bounds.py b/tools/telemetry/telemetry/core/timeline/bounds.py new file mode 100644 index 0000000..26f2301 --- /dev/null +++ b/tools/telemetry/telemetry/core/timeline/bounds.py @@ -0,0 +1,71 @@ +# 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. + +class Bounds(object): + """Represents a min-max bounds.""" + def __init__(self): + self.is_empty_ = True + self.min_ = None + self.max_ = None + + @property + def is_empty(self): + return self.is_empty_ + + @property + def min(self): + if self.is_empty_: + return None + return self.min_ + + @property + def max(self): + if self.is_empty_: + return None + return self.max_ + + @property + def bounds(self): + if self.is_empty_: + return None + return self.max_ - self.min_ + + @property + def center(self): + return (self.min_ + self.max_) * 0.5 + + + def Reset(self): + self.is_empty_ = True + self.min_ = None + self.max_ = None + + def AddBounds(self, bounds): + if bounds.isEmpty: + return + self.AddValue(bounds.min_) + self.AddValue(bounds.max_) + + def AddValue(self, value): + if self.is_empty_: + self.max_ = value + self.min_ = value + self.is_empty_ = False + return + + self.max_ = max(self.max_, value) + self.min_ = min(self.min_, value) + + @staticmethod + def CompareByMinTimes(a, b): + if not a.is_empty and not b.is_empty: + return a.min_ - b.min_ + + if a.is_empty and not b.is_empty: + return -1 + + if not a.is_empty and b.is_empty: + return 1 + + return 0 diff --git a/tools/telemetry/telemetry/core/timeline/tracing/counter.py b/tools/telemetry/telemetry/core/timeline/counter.py index 33f5e86..f21f516 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/counter.py +++ b/tools/telemetry/telemetry/core/timeline/counter.py @@ -2,32 +2,56 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -class Counter(object): - ''' Stores all the samples for a given counter. - ''' +import telemetry.core.timeline.event_container as event_container + +# Doesn't inherit from TimelineEvent because its only a temporary wrapper of a +# counter sample into an event. During stable operation, the samples are stored +# a dense array of values rather than in the long-form done by an Event. +class CounterSample(object): + def __init__(self, counter, sample_index): + self._counter = counter + self._sample_index = sample_index + + @property + def name(self): + return None + + @property + def start(self): + return self._counter.timestamps[self._sample_index] + + @start.setter + def start(self, start): + self._counter.timestamps[self._sample_index] = start + + @property + def duration(self): + return 0 + + @property + def end(self): + return self.start + + +class Counter(event_container.TimelineEventContainer): + """ Stores all the samples for a given counter. + """ def __init__(self, parent, category, name): - self.parent = parent - self.full_name = category + '.' + name + super(Counter, self).__init__(name, parent) self.category = category - self.name = name + self.full_name = category + '.' + name self.samples = [] self.timestamps = [] self.series_names = [] self.totals = [] self.max_total = 0 - self._bounds = None - @property - def min_timestamp(self): - if not self._bounds: - self.UpdateBounds() - return self._bounds[0] + def IterChildContainers(self): + return iter([]) - @property - def max_timestamp(self): - if not self._bounds: - self.UpdateBounds() - return self._bounds[1] + def IterEventsInThisContainer(self): + for i in range(len(self.timestamps)): + yield CounterSample(self, i) @property def num_series(self): @@ -37,7 +61,7 @@ class Counter(object): def num_samples(self): return len(self.timestamps) - def UpdateBounds(self): + def FinalizeImport(self): if self.num_series * self.num_samples != len(self.samples): raise ValueError( 'Length of samples must be a multiple of length of timestamps.') @@ -47,8 +71,6 @@ class Counter(object): if not len(self.samples): return - self._bounds = (self.timestamps[0], self.timestamps[-1]) - max_total = None for i in xrange(self.num_samples): total = 0 @@ -58,4 +80,3 @@ class Counter(object): if max_total is None or total > max_total: max_total = total self.max_total = max_total - diff --git a/tools/telemetry/telemetry/core/timeline/event.py b/tools/telemetry/telemetry/core/timeline/event.py index 6b8d8db..8b9db4c 100644 --- a/tools/telemetry/telemetry/core/timeline/event.py +++ b/tools/telemetry/telemetry/core/timeline/event.py @@ -4,25 +4,17 @@ class TimelineEvent(object): """Represents a timeline event.""" - def __init__(self, name, start, duration, args=None, parent=None): + def __init__(self, category, name, start, duration, args=None): + self.category = category self.name = name self.start = start self.duration = duration - self.children = [] - self.parent = parent self.args = args @property def end(self): return self.start + self.duration - @property - def self_time(self): - """Time spent in this function less any time spent in child events.""" - child_total = sum( - [e.duration for e in self.children]) - return self.duration - child_total - def __repr__(self): if self.args: args_str = ', ' + repr(self.args) @@ -34,39 +26,3 @@ class TimelineEvent(object): self.start, self.duration, args_str) - - @staticmethod - def _GetAllChildrenRecursive(events, item): - events.append(item) - for child in item.children: - TimelineEvent._GetAllChildrenRecursive(events, child) - - def GetAllChildrenRecursive(self, include_self=False): - events = [] - TimelineEvent._GetAllChildrenRecursive(events, self) - if not include_self: - del events[0] - return events - - def ShiftTimestampsForward(self, delta_time): - """ Shifts start time of event by delta_time and also - recursively shifts child events. - """ - for event in self.children: - event.ShiftTimestampsForward(delta_time) - self.start += delta_time - - def UpdateBounds(self): - """ Updates the start time to be the minimum start time of all - child events and the end time to be the maximum end time of all - child events. - """ - if not len(self.children): - return - - for event in self.children: - event.UpdateBounds() - - self.start = min(self.children, key=lambda e: e.start).start - end_timestamp = max(self.children, key=lambda e: e.end).end - self.duration = end_timestamp - self.start diff --git a/tools/telemetry/telemetry/core/timeline/event_container.py b/tools/telemetry/telemetry/core/timeline/event_container.py new file mode 100644 index 0000000..d84cb29 --- /dev/null +++ b/tools/telemetry/telemetry/core/timeline/event_container.py @@ -0,0 +1,15 @@ +# 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. + +class TimelineEventContainer(object): + """Represents a container for events.""" + def __init__(self, name, parent): + self.parent = parent + self.name = name + + def IterChildContainers(self): + raise NotImplementedError() + + def IterEventsInThisContainer(self): + raise NotImplementedError() diff --git a/tools/telemetry/telemetry/core/timeline/event_unittest.py b/tools/telemetry/telemetry/core/timeline/event_unittest.py index 7c965f0..2c80c32 100644 --- a/tools/telemetry/telemetry/core/timeline/event_unittest.py +++ b/tools/telemetry/telemetry/core/timeline/event_unittest.py @@ -4,24 +4,5 @@ import unittest -from telemetry.core.timeline import event - class TimelineEventTest(unittest.TestCase): - def testChildrenLogic(self): - # [ top ] - # [ a ] [ b ] - # [x] - top = event.TimelineEvent('top', 0, 10) - a = event.TimelineEvent('a', 1, 2) - x = event.TimelineEvent('x', 1.5, 0.25) - b = event.TimelineEvent('b', 5, 2) - top.children.extend([a, b]) - a.children.append(x) - - all_children = top.GetAllChildrenRecursive(include_self=True) - self.assertEquals([top, a, x, b], all_children) - - self.assertEquals(x.self_time, 0.25) - self.assertEquals(a.self_time, 1.75) # 2 - 0.25 - self.assertEquals(top.self_time, 6) # 10 - 2 -2 - + pass diff --git a/tools/telemetry/telemetry/core/timeline/inspector_importer.py b/tools/telemetry/telemetry/core/timeline/inspector_importer.py index ed9dad9..fa468cb 100644 --- a/tools/telemetry/telemetry/core/timeline/inspector_importer.py +++ b/tools/telemetry/telemetry/core/timeline/inspector_importer.py @@ -4,7 +4,7 @@ '''Imports event data obtained from the inspector's timeline.''' from telemetry.core.timeline import importer -import telemetry.core.timeline.event as timeline_event +import telemetry.core.timeline.thread as timeline_thread class InspectorTimelineImporter(importer.TimelineImporter): def __init__(self, model, event_data): @@ -22,34 +22,18 @@ class InspectorTimelineImporter(importer.TimelineImporter): return False def ImportEvents(self): + render_process = self._model.GetOrCreateProcess(0) + render_thread = render_process.GetOrCreateThread(0) for raw_event in self._event_data: - event = self.RawEventToTimelineEvent(raw_event) - if event: - self._model.AddEvent(event) + InspectorTimelineImporter.AddRawEventToThreadRecursive( + render_thread, raw_event) def FinalizeImport(self): pass @staticmethod - def RawEventToTimelineEvent(raw_inspector_event): - """Converts raw_inspector_event to TimelineEvent.""" - return InspectorTimelineImporter._RawEventToTimelineEventRecursive( - None, raw_inspector_event) - - @staticmethod - def _RawEventToTimelineEventRecursive( - parent_for_created_events, raw_inspector_event): - """ - Creates a new TimelineEvent for the raw_inspector_event, if possible, adding - it to the provided parent_for_created_events. - - It then recurses on any child events found inside, building a tree of - TimelineEvents. - - Returns the root of the created tree, or None. - """ - # Create a TimelineEvent for this raw_inspector_event if possible. Only - # events with start-time and end-time get imported. + def AddRawEventToThreadRecursive(thread, raw_inspector_event): + did_begin_slice = False if ('startTime' in raw_inspector_event and 'endTime' in raw_inspector_event): args = {} @@ -59,24 +43,27 @@ class InspectorTimelineImporter(importer.TimelineImporter): args[x] = raw_inspector_event[x] if len(args) == 0: args = None - newly_created_event = timeline_event.TimelineEvent( - name=raw_inspector_event['type'], - start=raw_inspector_event['startTime'], - duration=(raw_inspector_event['endTime'] - - raw_inspector_event['startTime']), - args=args, - parent=parent_for_created_events) - if parent_for_created_events: - parent_for_created_events.children.append(newly_created_event) - else: - newly_created_event = None + thread.BeginSlice('inspector', + raw_inspector_event['type'], + raw_inspector_event['startTime'], + args) + did_begin_slice = True - # Process any children events, creating TimelineEvents for them as well. - if newly_created_event: - parent_for_children = newly_created_event - else: - parent_for_children = parent_for_created_events for child in raw_inspector_event.get('children', []): - InspectorTimelineImporter._RawEventToTimelineEventRecursive( - parent_for_children, child) - return newly_created_event + InspectorTimelineImporter.AddRawEventToThreadRecursive( + thread, child) + + if did_begin_slice: + thread.EndSlice(raw_inspector_event['endTime']) + + @staticmethod + def RawEventToTimelineEvent(raw_inspector_event): + """Converts raw_inspector_event to TimelineEvent.""" + thread = timeline_thread.Thread(None, 0) + InspectorTimelineImporter.AddRawEventToThreadRecursive( + thread, raw_inspector_event) + thread.FinalizeImport() + assert len(thread.toplevel_slices) <= 1 + if len(thread.toplevel_slices) == 0: + return None + return thread.toplevel_slices[0] diff --git a/tools/telemetry/telemetry/core/timeline/inspector_importer_unittest.py b/tools/telemetry/telemetry/core/timeline/inspector_importer_unittest.py index 1f44f51..4a19f2e 100644 --- a/tools/telemetry/telemetry/core/timeline/inspector_importer_unittest.py +++ b/tools/telemetry/telemetry/core/timeline/inspector_importer_unittest.py @@ -50,7 +50,7 @@ class InspectorEventParsingTest(unittest.TestCase): .RawEventToTimelineEvent(_SAMPLE_MESSAGE)) self.assertTrue(root_event) decode_image_event = [ - child for child in root_event.GetAllChildrenRecursive() + child for child in root_event.IterEventsInThisContainerRecrusively() if child.name == 'DecodeImage'][0] self.assertEquals(decode_image_event.args['data']['imageType'], 'PNG') self.assertTrue(decode_image_event.duration > 0) @@ -66,7 +66,7 @@ class InspectorEventParsingTest(unittest.TestCase): self.assertEquals(1, event.start) self.assertEquals(3, event.end) self.assertEquals(2, event.duration) - self.assertEquals([], event.children) + self.assertEquals([], event.sub_slices) def testParsingWithArgs(self): raw_event = {'type': 'Foo', @@ -80,7 +80,7 @@ class InspectorEventParsingTest(unittest.TestCase): self.assertEquals(1, event.start) self.assertEquals(3, event.end) self.assertEquals(2, event.duration) - self.assertEquals([], event.children) + self.assertEquals([], event.sub_slices) self.assertEquals(7, event.args['foo']) self.assertEquals(1, event.args['bar']['x']) diff --git a/tools/telemetry/telemetry/core/timeline/model.py b/tools/telemetry/telemetry/core/timeline/model.py index 1231af1..47606a9 100644 --- a/tools/telemetry/telemetry/core/timeline/model.py +++ b/tools/telemetry/telemetry/core/timeline/model.py @@ -7,9 +7,13 @@ trace_viewer project: https://code.google.com/p/trace-viewer/ ''' +import telemetry.core.timeline.process as tracing_process + # Register importers for data from telemetry.core.timeline import inspector_importer -from telemetry.core.timeline.tracing import trace_event_importer +from telemetry.core.timeline import bounds +from telemetry.core.timeline import trace_event_importer + _IMPORTERS = [ inspector_importer.InspectorTimelineImporter, trace_event_importer.TraceEventTimelineImporter @@ -17,38 +21,22 @@ _IMPORTERS = [ class TimelineModel(object): def __init__(self, event_data=None, shift_world_to_zero=True): - self._root_events = [] - self._all_events = [] + self._bounds = bounds.Bounds() + self._processes = {} self._frozen = False self.import_errors = [] self.metadata = [] - self._bounds = None if event_data is not None: self.ImportTraces([event_data], shift_world_to_zero=shift_world_to_zero) @property - def min_timestamp(self): - if self._bounds is None: - self.UpdateBounds() - return self._bounds[0] + def bounds(self): + return self._bounds @property - def max_timestamp(self): - if self._bounds is None: - self.UpdateBounds() - return self._bounds[1] - - def AddEvent(self, event): - if self._frozen: - raise Exception("Cannot add events once recording is done") - self._root_events.append(event) - - def DidFinishRecording(self): - for event in self._root_events: - self._all_events.extend( - event.GetAllChildrenRecursive(include_self=True)) - self._frozen = True + def processes(self): + return self._processes def ImportTraces(self, traces, shift_world_to_zero=True): if self._frozen: @@ -64,44 +52,71 @@ class TimelineModel(object): # TODO: catch exceptions here and add it to error list importer.ImportEvents() + self.UpdateBounds() + if not self.bounds.is_empty: + for process in self._processes.itervalues(): + process.AutoCloseOpenSlices(self.bounds.max) + for importer in importers: importer.FinalizeImport() if shift_world_to_zero: self.ShiftWorldToZero() + self.UpdateBounds() # Because of FinalizeImport, it would probably be a good idea # to prevent the timeline from from being modified. - self.DidFinishRecording() + self._frozen = True def ShiftWorldToZero(self): - if not len(self._root_events): - return self.UpdateBounds() - delta = min(self._root_events, key=lambda e: e.start).start - for event in self._root_events: - event.ShiftTimestampsForward(-delta) - - def UpdateBounds(self): - if not len(self._root_events): - self._bounds = (0, 0) + if self._bounds.is_empty: return + shift_amount = -self._bounds.min + for event in self.IterAllEvents(): + event.start += shift_amount - for e in self._root_events: - e.UpdateBounds() - - first_event = min(self._root_events, key=lambda e: e.start) - last_event = max(self._root_events, key=lambda e: e.end) - self._bounds = (first_event.start, last_event.end) - - def GetRootEvents(self): - return self._root_events + def UpdateBounds(self): + self._bounds.Reset() + for event in self.IterAllEvents(): + self._bounds.AddValue(event.start) + self._bounds.AddValue(event.end) + + def GetAllContainers(self): + containers = [] + def Iter(container): + containers.append(container) + for container in container.IterChildContainers(): + Iter(container) + for process in self._processes.itervalues(): + Iter(process) + return containers + + def IterAllEvents(self): + for container in self.GetAllContainers(): + for event in container.IterEventsInThisContainer(): + yield event + + def GetAllProcesses(self): + return self._processes.values() + + def GetAllThreads(self): + threads = [] + for process in self._processes.values(): + threads.extend(process.threads.values()) + return threads def GetAllEvents(self): - return self._all_events + return list(self.IterAllEvents()) def GetAllEventsOfName(self, name): - return [e for e in self._all_events if e.name == name] + return [e for e in self.IterAllEvents() if e.name == name] + + def GetOrCreateProcess(self, pid): + if pid not in self._processes: + assert not self._frozen + self._processes[pid] = tracing_process.Process(self, pid) + return self._processes[pid] def _CreateImporter(self, event_data): for importer_class in _IMPORTERS: diff --git a/tools/telemetry/telemetry/core/timeline/model_unittest.py b/tools/telemetry/telemetry/core/timeline/model_unittest.py index 25fd0d3..e5a406d 100644 --- a/tools/telemetry/telemetry/core/timeline/model_unittest.py +++ b/tools/telemetry/telemetry/core/timeline/model_unittest.py @@ -4,15 +4,5 @@ import unittest -from telemetry.core.timeline.event import TimelineEvent -from telemetry.core.timeline.model import TimelineModel - class TimelineModelUnittest(unittest.TestCase): - def testTimelineEventsOfType(self): - timeline_model = TimelineModel() - a = TimelineEvent('a', 0, 10) - b = TimelineEvent('b', 11, 10) - timeline_model.AddEvent(a) - timeline_model.AddEvent(b) - timeline_model.DidFinishRecording() - self.assertEquals(1, len(timeline_model.GetAllEventsOfName('a'))) + pass diff --git a/tools/telemetry/telemetry/core/timeline/tracing/process.py b/tools/telemetry/telemetry/core/timeline/process.py index d25c3af..5a26619 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/process.py +++ b/tools/telemetry/telemetry/core/timeline/process.py @@ -2,17 +2,17 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -import telemetry.core.timeline.event as timeline_event -import telemetry.core.timeline.tracing.counter as tracing_counter -import telemetry.core.timeline.tracing.thread as tracing_thread +import telemetry.core.timeline.event_container as event_container +import telemetry.core.timeline.counter as tracing_counter +import telemetry.core.timeline.thread as tracing_thread -class Process(timeline_event.TimelineEvent): +class Process(event_container.TimelineEventContainer): ''' The Process represents a single userland process in the trace. ''' - def __init__(self, pid): - super(Process, self).__init__('process %s' % pid, 0, 0) + def __init__(self, parent, pid): + super(Process, self).__init__('process %s' % pid, parent) self.pid = pid - self._threads = [] + self._threads = {} self._counters = {} @property @@ -23,21 +23,23 @@ class Process(timeline_event.TimelineEvent): def counters(self): return self._counters - def GetThreadWithId(self, tid): - for t in self.threads: - if t.tid == tid: - return t - raise ValueError( - 'Thread with id %s not found in process with id %s.' % (tid, self.pid)) + def IterChildContainers(self): + for thread in self._threads.itervalues(): + yield thread + for counter in self._counters.itervalues(): + yield counter + + def IterEventsInThisContainer(self): + return + yield # pylint: disable=W0101 def GetOrCreateThread(self, tid): - try: - return self.GetThreadWithId(tid) - except ValueError: - thread = tracing_thread.Thread(self, tid) - self.children.append(thread) - self._threads.append(thread) + thread = self.threads.get(tid, None) + if thread: return thread + thread = tracing_thread.Thread(self, tid) + self._threads[tid] = thread + return thread def GetCounter(self, category, name): counter_id = category + '.' + name @@ -54,11 +56,12 @@ class Process(timeline_event.TimelineEvent): self._counters[ctr.full_name] = ctr return ctr - def UpdateBounds(self): - super(Process, self).UpdateBounds() - for ctr in self.counters.itervalues(): - ctr.UpdateBounds() + def AutoCloseOpenSlices(self, max_timestamp): + for thread in self._threads.itervalues(): + thread.AutoCloseOpenSlices(max_timestamp) def FinalizeImport(self): - for thread in self._threads: + for thread in self._threads.itervalues(): thread.FinalizeImport() + for counter in self._counters.itervalues(): + counter.FinalizeImport() diff --git a/tools/telemetry/telemetry/core/timeline/tracing/sample.py b/tools/telemetry/telemetry/core/timeline/sample.py index 5f7f672..36a3ab4 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/sample.py +++ b/tools/telemetry/telemetry/core/timeline/sample.py @@ -13,7 +13,7 @@ class Sample(timeline_event.TimelineEvent): All time units are stored in milliseconds. ''' - def __init__(self, category, name, timestamp, args=None, parent=None): + def __init__(self, parent_thread, category, name, timestamp, args=None): super(Sample, self).__init__( - name, timestamp, 0, args=args, parent=parent) - self.category = category + category, name, timestamp, 0, args=args) + self.parent_thread = parent_thread diff --git a/tools/telemetry/telemetry/core/timeline/slice.py b/tools/telemetry/telemetry/core/timeline/slice.py new file mode 100644 index 0000000..5ce2b28 --- /dev/null +++ b/tools/telemetry/telemetry/core/timeline/slice.py @@ -0,0 +1,52 @@ +# 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. + +import telemetry.core.timeline.event as timeline_event + +class Slice(timeline_event.TimelineEvent): + """A Slice represents an interval of time plus parameters associated + with that interval. + + NOTE: The Sample class implements the same interface as + Slice. These must be kept in sync. + + All time units are stored in milliseconds. + """ + def __init__(self, parent_thread, category, name, timestamp, + args=None, duration=0): + super(Slice, self).__init__( + category, name, timestamp, duration, args=args) + self.parent_thread = parent_thread + self.parent_slice = None + self.sub_slices = [] + self.did_not_finish = False + + def AddSubSlice(self, sub_slice): + assert sub_slice.parent_slice == self + self.sub_slices.append(sub_slice) + + def IterEventsInThisContainerRecrusively(self): + for sub_slice in self.sub_slices: + yield sub_slice + for sub_sub in sub_slice.IterEventsInThisContainerRecrusively(): + yield sub_sub + + @property + def self_time(self): + """Time spent in this function less any time spent in child events.""" + child_total = sum( + [e.duration for e in self.sub_slices]) + return self.duration - child_total + + def _GetSubSlicesRecursive(self): + for sub_slice in self.sub_slices: + for s in sub_slice.GetAllSubSlices(): + yield s + yield sub_slice + + def GetAllSubSlices(self): + return list(self._GetSubSlicesRecursive()) + + def GetAllSubSlicesOfName(self, name): + return [e for e in self.GetAllSubSlices() if e.name == name] diff --git a/tools/telemetry/telemetry/core/timeline/slice_unittest.py b/tools/telemetry/telemetry/core/timeline/slice_unittest.py new file mode 100644 index 0000000..e2d6b82 --- /dev/null +++ b/tools/telemetry/telemetry/core/timeline/slice_unittest.py @@ -0,0 +1,26 @@ +# 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. + +import unittest + +from telemetry.core.timeline.slice import Slice + +class SliceTest(unittest.TestCase): + def testChildrenLogic(self): + # [ top ] + # [ a ] [ b ] + # [x] + top = Slice(None, 'cat', 'top', 0, duration=10) + a = Slice(None, 'cat', 'a', 1, duration=2) + x = Slice(None, 'cat', 'x', 1.5, duration=0.25) + b = Slice(None, 'cat', 'b', 5, duration=2) + top.sub_slices.extend([a, b]) + a.sub_slices.append(x) + + all_children = list(top.IterEventsInThisContainerRecrusively()) + self.assertEquals([a, x, b], all_children) + + self.assertEquals(x.self_time, 0.25) + self.assertEquals(a.self_time, 1.75) # 2 - 0.25 + self.assertEquals(top.self_time, 6) # 10 - 2 -2 diff --git a/tools/telemetry/telemetry/core/timeline/tracing/thread.py b/tools/telemetry/telemetry/core/timeline/thread.py index 8bb184a..864f39f 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/thread.py +++ b/tools/telemetry/telemetry/core/timeline/thread.py @@ -1,54 +1,82 @@ # 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. +import itertools -import telemetry.core.timeline.event as timeline_event -import telemetry.core.timeline.tracing.sample as tracing_sample -import telemetry.core.timeline.tracing.slice as tracing_slice +import telemetry.core.timeline.event_container as event_container +import telemetry.core.timeline.sample as tracing_sample +import telemetry.core.timeline.slice as tracing_slice -class Thread(timeline_event.TimelineEvent): +class Thread(event_container.TimelineEventContainer): ''' A Thread stores all the trace events collected for a particular thread. We organize the synchronous slices on a thread by "subrows," where subrow 0 has all the root slices, subrow 1 those nested 1 deep, and so on. The asynchronous slices are stored in an AsyncSliceGroup object. ''' def __init__(self, process, tid): - super(Thread, self).__init__('thread %s' % tid, 0, 0, parent=process) + super(Thread, self).__init__('thread %s' % tid, parent=process) self.tid = tid - self._open_slices = [] self._async_slices = [] self._samples = [] - self._slices = [] + self._toplevel_slices = [] + + # State only valid during import. + self._open_slices = [] + self._newly_added_slices = [] @property - def slices(self): - return self._slices + def toplevel_slices(self): + return self._toplevel_slices + + @property + def all_slices(self): + return list(self.IterAllSlices()) @property def samples(self): return self._samples @property + def async_slices(self): + return self._async_slices + + @property def open_slice_count(self): return len(self._open_slices) - @property - def async_slices(self): - return self._async_slices + def IterChildContainers(self): + return iter([]) + + def IterAllSlices(self): + for s in self._toplevel_slices: + yield s + for sub_slice in s.IterEventsInThisContainerRecrusively(): + yield sub_slice + def IterAllAsyncSlices(self): + for async_slice in self._async_slices: + yield async_slice + for sub_slice in async_slice.IterEventsInThisContainerRecrusively(): + yield sub_slice + + def IterEventsInThisContainer(self): + itertools.chain( + iter(self._open_slices), + iter(self._newly_added_slices), + self.IterAllAsyncSlices, + self.IterAllSlices, + iter(self._samples) + ) def AddSample(self, category, name, timestamp, args=None): if len(self._samples) and timestamp < self._samples[-1].start: raise ValueError( 'Samples must be added in increasing timestamp order') - sample = tracing_sample.Sample( - category, name, timestamp, args=args, parent=self) + sample = tracing_sample.Sample(self, + category, name, timestamp, args=args) self._samples.append(sample) - self.children.append(sample) def AddAsyncSlice(self, async_slice): self._async_slices.append(async_slice) - async_slice.parent = self - self.children.append(async_slice) def BeginSlice(self, category, name, timestamp, args=None): """Opens a new slice for the thread. @@ -66,7 +94,7 @@ class Thread(timeline_event.TimelineEvent): raise ValueError( 'Slices must be added in increasing timestamp order') self._open_slices.append( - tracing_slice.Slice(category, name, timestamp, args=args, parent=self)) + tracing_slice.Slice(self, category, name, timestamp, args=args)) def EndSlice(self, end_timestamp): """ Ends the last begun slice in this group and pushes it onto the slice @@ -87,14 +115,10 @@ class Thread(timeline_event.TimelineEvent): return self.PushSlice(curr_slice) def PushSlice(self, new_slice): - self._slices.append(new_slice) - self.children.append(new_slice) + self._newly_added_slices.append(new_slice) return new_slice - def AutoCloseOpenSlices(self, max_timestamp=None): - if max_timestamp is None: - self.UpdateBounds() - max_timestamp = self.end + def AutoCloseOpenSlices(self, max_timestamp): while len(self._open_slices) > 0: curr_slice = self.EndSlice(max_timestamp) curr_slice.did_not_finish = True @@ -104,16 +128,6 @@ class Thread(timeline_event.TimelineEvent): return True return timestamp >= self._open_slices[-1].start - def UpdateBounds(self): - super(Thread, self).UpdateBounds() - - # Take open slices into account for the start and duration of thread event - if len(self._open_slices) > 0: - if not len(self.slices) or self.start > self._open_slices[0].start: - self.start = self._open_slices[0].start - if not len(self.slices) or self.end < self._open_slices[-1].start: - self.duration = self._open_slices[-1].start - self.start - def FinalizeImport(self): self._BuildSliceSubRows() @@ -155,14 +169,18 @@ class Thread(timeline_event.TimelineEvent): return cmp(s2.end, s1.end) return cmp(s1.start, s2.start) - if not len(self._slices): + assert len(self._toplevel_slices) == 0 + if not len(self._newly_added_slices): return - sorted_slices = sorted(self._slices, cmp=CompareSlices) + sorted_slices = sorted(self._newly_added_slices, cmp=CompareSlices) root_slice = sorted_slices[0] + self._toplevel_slices.append(root_slice) for s in sorted_slices[1:]: if not self._AddSliceIfBounds(root_slice, s): root_slice = s + self._toplevel_slices.append(root_slice) + self._newly_added_slices = [] def _AddSliceIfBounds(self, root, child): ''' Adds a child slice to a root slice its proper row. @@ -177,6 +195,7 @@ class Thread(timeline_event.TimelineEvent): if len(root.sub_slices) > 0: if self._AddSliceIfBounds(root.sub_slices[-1], child): return True + child.parent_slice = root root.AddSubSlice(child) return True return False diff --git a/tools/telemetry/telemetry/core/timeline/tracing/trace_event_importer.py b/tools/telemetry/telemetry/core/timeline/trace_event_importer.py index 636ac20..2b191d4 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/trace_event_importer.py +++ b/tools/telemetry/telemetry/core/timeline/trace_event_importer.py @@ -12,15 +12,13 @@ import json import re from telemetry.core.timeline import importer -import telemetry.core.timeline.tracing.async_slice as tracing_async_slice -import telemetry.core.timeline.tracing.process as tracing_process +import telemetry.core.timeline.async_slice as tracing_async_slice class TraceEventTimelineImporter(importer.TimelineImporter): def __init__(self, model, event_data): super(TraceEventTimelineImporter, self).__init__( model, event_data, import_priority=1) - self._processes = {} self._events_were_from_string = False self._all_async_events = [] self._all_object_events = [] @@ -83,9 +81,7 @@ class TraceEventTimelineImporter(importer.TimelineImporter): return False def _GetOrCreateProcess(self, pid): - if pid not in self._processes: - self._processes[pid] = tracing_process.Process(pid) - return self._processes[pid] + return self._model.GetOrCreateProcess(pid) def _DeepCopyIfNeeded(self, obj): if self._events_were_from_string: @@ -236,23 +232,15 @@ class TraceEventTimelineImporter(importer.TimelineImporter): def FinalizeImport(self): '''Called by the Model after all other importers have imported their events.''' - # Add all top level process events to the model. - for process in self._processes.itervalues(): - self._model.AddEvent(process) self._model.UpdateBounds() - # Autoclose all open slices - for process in self._processes.itervalues(): - for thread in process.threads: - thread.AutoCloseOpenSlices(max_timestamp=self._model.max_timestamp) - # We need to reupdate the bounds in case the minimum start time changes self._model.UpdateBounds() self._CreateAsyncSlices() self._CreateExplicitObjects() self._CreateImplicitObjects() - for process in self._processes.itervalues(): + for process in self._model.processes.itervalues(): process.FinalizeImport() def _CreateAsyncSlices(self): @@ -312,8 +300,7 @@ class TraceEventTimelineImporter(importer.TimelineImporter): async_slice = tracing_async_slice.AsyncSlice( events[0]['event']['cat'], name, - events[0]['event']['ts'] / 1000.0, - parent=self) + events[0]['event']['ts'] / 1000.0) async_slice.duration = ((event['ts'] / 1000.0) - (events[0]['event']['ts'] / 1000.0)) @@ -332,6 +319,7 @@ class TraceEventTimelineImporter(importer.TimelineImporter): events[0]['event']['cat'], sub_name, events[j - 1]['event']['ts'] / 1000.0) + sub_slice.parent_slice = async_slice sub_slice.duration = ((events[j]['event']['ts'] / 1000.0) - (events[j - 1]['event']['ts'] / 1000.0)) diff --git a/tools/telemetry/telemetry/core/timeline/tracing/trace_event_importer_unittest.py b/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py index 52de6c5..1aa6a3b 100644 --- a/tools/telemetry/telemetry/core/timeline/tracing/trace_event_importer_unittest.py +++ b/tools/telemetry/telemetry/core/timeline/trace_event_importer_unittest.py @@ -5,11 +5,9 @@ import json import unittest -from telemetry.core.timeline.tracing import trace_event_importer +from telemetry.core.timeline import trace_event_importer import telemetry.core.timeline.model as timeline_model -import telemetry.core.timeline.tracing.counter as tracing_counter -import telemetry.core.timeline.tracing.process as tracing_process -import telemetry.core.timeline.tracing.thread as tracing_thread +import telemetry.core.timeline.counter as tracing_counter def FindEventNamed(events, name): for event in events: @@ -17,14 +15,6 @@ def FindEventNamed(events, name): return event raise ValueError('No event found with name %s' % name) -def GetAllProcesses(model): - return [e for e in model.GetRootEvents() if isinstance( - e, tracing_process.Process)] - -def GetAllThreads(model): - return [e for e in model.GetAllEvents() if isinstance( - e, tracing_thread.Thread)] - class TraceEventTimelineImporterTest(unittest.TestCase): def testCanImportEmpty(self): self.assertFalse( @@ -45,28 +35,28 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(52, p.pid) self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(53) - self.assertEqual(2, len(t.slices)) + t = p.threads[53] + self.assertEqual(2, len(t.all_slices)) self.assertEqual(53, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertAlmostEqual(0, slice_event.start) self.assertAlmostEqual((560 - 520) / 1000.0, slice_event.duration) - self.assertEqual(0, len(slice_event.children)) + self.assertEqual(0, len(slice_event.sub_slices)) - slice_event = t.slices[1] + slice_event = t.all_slices[1] self.assertEqual('b', slice_event.name) self.assertEqual('bar', slice_event.category) self.assertAlmostEqual((629 - 520) / 1000.0, slice_event.start) self.assertAlmostEqual((631 - 629) / 1000.0, slice_event.duration) - self.assertEqual(0, len(slice_event.children)) + self.assertEqual(0, len(slice_event.sub_slices)) def testArgumentDupeCreatesNonFailingImportError(self): events = [ @@ -77,9 +67,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) - t = processes[0].GetThreadWithId(1) - slice_a = FindEventNamed(t.slices, 'a') + processes = m.GetAllProcesses() + t = processes[0].threads[1] + slice_a = FindEventNamed(t.all_slices, 'a') self.assertEqual(2, slice_a.args['x']) self.assertEqual(1, len(m.import_errors)) @@ -93,16 +83,16 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(52, p.pid) self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(53) - self.assertEqual(1, len(t.slices)) + t = p.threads[53] + self.assertEqual(1, len(t.all_slices)) self.assertEqual(53, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) @@ -119,10 +109,10 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - t = GetAllProcesses(m)[0].GetThreadWithId(1) + t = m.GetAllProcesses()[0].threads[1] - slice_a = FindEventNamed(t.slices, 'a') - slice_b = FindEventNamed(t.slices, 'b') + slice_a = FindEventNamed(t.all_slices, 'a') + slice_b = FindEventNamed(t.all_slices, 'b') self.assertEqual('a', slice_a.name) self.assertEqual('foo', slice_a.category) @@ -147,9 +137,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 2, 'ph': 'E'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(1) - slice_event = t.slices[0] + p = m.GetAllProcesses()[0] + t = p.threads[1] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertTrue(slice_event.did_not_finish) @@ -163,9 +153,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 1, 'ph': 'B'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(1) - slice_event = t.slices[0] + p = m.GetAllProcesses()[0] + t = p.threads[1] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertTrue(slice_event.did_not_finish) @@ -185,11 +175,11 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - t = GetAllProcesses(m)[0].GetThreadWithId(1) + t = m.GetAllProcesses()[0].threads[1] - slice_a = FindEventNamed(t.slices, 'a') - slice_b1 = FindEventNamed(t.slices, 'b1') - slice_b2 = FindEventNamed(t.slices, 'b2') + slice_a = FindEventNamed(t.all_slices, 'a') + slice_b1 = FindEventNamed(t.all_slices, 'b1') + slice_b2 = FindEventNamed(t.all_slices, 'b2') self.assertAlmostEqual(0.003, slice_a.end) self.assertAlmostEqual(0.003, slice_b1.end) @@ -211,28 +201,25 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(1) - self.assertEqual(2, len(t.slices)) + p = m.GetAllProcesses()[0] + t = p.threads[1] + self.assertEqual(2, len(t.all_slices)) - slice_event = FindEventNamed(t.slices, 'a') + slice_event = FindEventNamed(t.all_slices, 'a') self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertAlmostEqual(0, slice_event.start) self.assertAlmostEqual(0.003, slice_event.duration) - t2 = p.GetThreadWithId(2) - slice2 = FindEventNamed(t2.slices, 'c') + t2 = p.threads[2] + slice2 = FindEventNamed(t2.all_slices, 'c') self.assertEqual('c', slice2.name) self.assertEqual('bar', slice2.category) self.assertAlmostEqual(0.001, slice2.start) self.assertAlmostEqual(0.001, slice2.duration) - self.assertAlmostEqual(0.000, p.start) - self.assertAlmostEqual(0.003, p.end) - - self.assertAlmostEqual(0.000, m.min_timestamp) - self.assertAlmostEqual(0.003, m.max_timestamp) + self.assertAlmostEqual(0.000, m.bounds.min) + self.assertAlmostEqual(0.003, m.bounds.max) def testNestedAutoclosing(self): events = [ @@ -250,12 +237,12 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - t1 = GetAllProcesses(m)[0].GetThreadWithId(1) - t2 = GetAllProcesses(m)[0].GetThreadWithId(2) + t1 = m.GetAllProcesses()[0].threads[1] + t2 = m.GetAllProcesses()[0].threads[2] - slice_a1 = FindEventNamed(t1.slices, 'a1') - slice_a2 = FindEventNamed(t1.slices, 'a2') - FindEventNamed(t2.slices, 'b') + slice_a1 = FindEventNamed(t1.all_slices, 'a1') + slice_a2 = FindEventNamed(t1.all_slices, 'a2') + FindEventNamed(t2.all_slices, 'b') self.assertAlmostEqual(0.002, slice_a1.end) self.assertAlmostEqual(0.002, slice_a2.end) @@ -272,29 +259,29 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 2, 'ph': 'E'} ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(2, len(p.threads)) # Check thread 1. - t = p.GetThreadWithId(1) - self.assertAlmostEqual(1, len(t.slices)) + t = p.threads[1] + self.assertAlmostEqual(1, len(t.all_slices)) self.assertAlmostEqual(1, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertAlmostEqual(0, slice_event.start) self.assertAlmostEqual((2 - 1) / 1000.0, slice_event.duration) # Check thread 2. - t = p.GetThreadWithId(2) - self.assertAlmostEqual(1, len(t.slices)) + t = p.threads[2] + self.assertAlmostEqual(1, len(t.all_slices)) self.assertAlmostEqual(2, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('b', slice_event.name) self.assertEqual('bar', slice_event.category) self.assertAlmostEqual((3 - 1) / 1000.0, slice_event.start) @@ -313,7 +300,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(2, len(processes)) p = processes[0] @@ -321,11 +308,11 @@ class TraceEventTimelineImporterTest(unittest.TestCase): self.assertEqual(1, len(p.threads)) # Check process 1 thread 1. - t = p.GetThreadWithId(1) - self.assertEqual(1, len(t.slices)) + t = p.threads[1] + self.assertEqual(1, len(t.all_slices)) self.assertEqual(1, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertAlmostEqual(0, slice_event.start) @@ -336,20 +323,20 @@ class TraceEventTimelineImporterTest(unittest.TestCase): p = processes[1] self.assertEqual(2, p.pid) self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(2) - self.assertEqual(1, len(t.slices)) + t = p.threads[2] + self.assertEqual(1, len(t.all_slices)) self.assertEqual(2, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('b', slice_event.name) self.assertEqual('bar', slice_event.category) self.assertAlmostEqual((3 - 1) / 1000.0, slice_event.start) self.assertAlmostEqual((4 - 3) / 1000.0, slice_event.duration) # Check getAllThreads. - self.assertEqual([processes[0].GetThreadWithId(1), - processes[1].GetThreadWithId(2)], - GetAllThreads(m)) + self.assertEqual([processes[0].threads[1], + processes[1].threads[2]], + m.GetAllThreads()) def testThreadNames(self): events = [ @@ -367,9 +354,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'pid': 2, 'ts': 0, 'tid': 2, 'ph': 'M'} ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) - self.assertEqual('Thread 1', processes[0].GetThreadWithId(1).name) - self.assertEqual('Thread 2', processes[1].GetThreadWithId(2).name) + processes = m.GetAllProcesses() + self.assertEqual('Thread 1', processes[0].threads[1].name) + self.assertEqual('Thread 2', processes[1].threads[2].name) def testParsingWhenEndComesFirst(self): events = [ @@ -382,13 +369,13 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(1) - self.assertEqual(1, len(t.slices)) - self.assertEqual('a', t.slices[0].name) - self.assertEqual('foo', t.slices[0].category) - self.assertEqual(0.004, t.slices[0].start) - self.assertEqual(0.001, t.slices[0].duration) + p = m.GetAllProcesses()[0] + t = p.threads[1] + self.assertEqual(1, len(t.all_slices)) + self.assertEqual('a', t.all_slices[0].name) + self.assertEqual('foo', t.all_slices[0].category) + self.assertEqual(0.004, t.all_slices[0].start) + self.assertEqual(0.001, t.all_slices[0].duration) self.assertEqual(1, len(m.import_errors)) def testImmediateParsing(self): @@ -406,27 +393,30 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(1) - self.assertEqual(3, len(t.slices)) - self.assertAlmostEqual(0.002, t.slices[0].start) - self.assertAlmostEqual(0, t.slices[0].duration) - self.assertAlmostEqual(0.004, t.slices[1].start) - self.assertAlmostEqual(0.001, t.slices[2].start) - self.assertAlmostEqual(0.003, t.slices[2].duration) - - slice_event = FindEventNamed(t.slices, 'a') - self.assertEqual('a', slice_event.name) - self.assertEqual('foo', slice_event.category) - self.assertEqual(0.003, slice_event.duration) + p = m.GetAllProcesses()[0] + t = p.threads[1] + self.assertEqual(3, len(t.all_slices)) + + i = m.GetAllEventsOfName('immediate')[0] + self.assertAlmostEqual(0.002, i.start) + self.assertAlmostEqual(0, i.duration) - immed = FindEventNamed(t.slices, 'immediate') - self.assertEqual('immediate', immed.name) - self.assertEqual('bar', immed.category) - self.assertAlmostEqual(0.002, immed.start) - self.assertAlmostEqual(0, immed.duration) + slower = m.GetAllEventsOfName('slower')[0] + self.assertAlmostEqual(0.004, slower.start) + + a = m.GetAllEventsOfName('a')[0] + self.assertAlmostEqual(0.001, a.start) + self.assertAlmostEqual(0.003, a.duration) + + self.assertEqual('a', a.name) + self.assertEqual('foo', a.category) + self.assertEqual(0.003, a.duration) + + self.assertEqual('immediate', i.name) + self.assertEqual('bar', i.category) + self.assertAlmostEqual(0.002, i.start) + self.assertAlmostEqual(0, i.duration) - slower = FindEventNamed(t.slices, 'slower') self.assertEqual('slower', slower.name) self.assertEqual('baz', slower.category) self.assertAlmostEqual(0.004, slower.start) @@ -442,7 +432,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 1, 'ph': 'C'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] + p = m.GetAllProcesses()[0] ctr = p.counters['foo.ctr'] self.assertEqual('ctr', ctr.name) @@ -478,7 +468,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'ph': 'C', 'id': 2} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] + p = m.GetAllProcesses()[0] ctr = p.counters['foo.ctr[0]'] self.assertEqual('ctr[0]', ctr.name) self.assertEqual('foo', ctr.category) @@ -487,7 +477,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): self.assertEqual([0, 0.01], ctr.timestamps) self.assertEqual([0, 10], ctr.samples) - ctr = GetAllProcesses(m)[0].counters['foo.ctr[1]'] + ctr = m.GetAllProcesses()[0].counters['foo.ctr[1]'] self.assertEqual('ctr[1]', ctr.name) self.assertEqual('foo', ctr.category) self.assertEqual(3, ctr.num_samples) @@ -495,7 +485,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): self.assertEqual([0.01, 0.015, 0.018], ctr.timestamps) self.assertEqual([10, 20, 30], ctr.samples) - ctr = GetAllProcesses(m)[0].counters['bar.ctr[2]'] + ctr = m.GetAllProcesses()[0].counters['bar.ctr[2]'] self.assertEqual('ctr[2]', ctr.name) self.assertEqual('bar', ctr.category) self.assertEqual(1, ctr.num_samples) @@ -516,9 +506,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 1, 7, 3, 0, 3.1, 0.5] - ctr.UpdateBounds() - self.assertEqual(0, ctr.min_timestamp) - self.assertEqual(7, ctr.max_timestamp) + ctr.FinalizeImport() self.assertEqual(8, ctr.max_total) self.assertEqual([0, 0, 1, 1, @@ -539,7 +527,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'cat': 'foo', 'tid': 1, 'ph': 'C'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] + p = m.GetAllProcesses()[0] ctr = p.counters['foo.ctr'] self.assertEqual('ctr', ctr.name) @@ -564,7 +552,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] } m = timeline_model.TimelineModel(event_data=events) - self.assertEqual(1, len(GetAllProcesses(m))) + self.assertEqual(1, len(m.GetAllProcesses())) def testImportString(self): events = [ @@ -575,7 +563,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=json.dumps(events)) - self.assertEqual(1, len(GetAllProcesses(m))) + self.assertEqual(1, len(m.GetAllProcesses())) def testImportStringWithTrailingNewLine(self): events = [ @@ -586,7 +574,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=json.dumps(events) + '\n') - self.assertEqual(1, len(GetAllProcesses(m))) + self.assertEqual(1, len(m.GetAllProcesses())) def testImportStringWithMissingCloseSquareBracket(self): events = [ @@ -602,7 +590,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): # Drop off the trailing ] dropped = tmp[:-1] m = timeline_model.TimelineModel(event_data=dropped) - self.assertEqual(1, len(GetAllProcesses(m))) + self.assertEqual(1, len(m.GetAllProcesses())) def testImportStringWithEndingCommaButMissingCloseSquareBracket(self): lines = [ @@ -615,9 +603,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): text = '\n'.join(lines) m = timeline_model.TimelineModel(event_data=text) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) - self.assertEqual(1, len(processes[0].GetThreadWithId(53).slices)) + self.assertEqual(1, len(processes[0].threads[53].all_slices)) def testImportStringWithMissingCloseSquareBracketAndNewline(self): events = [ @@ -633,7 +621,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): # Drop off the trailing ] and add a newline dropped = tmp[:-1] m = timeline_model.TimelineModel(event_data=dropped + '\n') - self.assertEqual(1, len(GetAllProcesses(m))) + self.assertEqual(1, len(m.GetAllProcesses())) def testImportStringWithEndingCommaButMissingCloseSquareBracketCRLF(self): lines = [ @@ -646,9 +634,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): text = '\r\n'.join(lines) m = timeline_model.TimelineModel(event_data=text) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) - self.assertEqual(1, len(processes[0].GetThreadWithId(53).slices)) + self.assertEqual(1, len(processes[0].threads[53].all_slices)) def testImportOldFormat(self): lines = [ @@ -659,9 +647,9 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] text = '\n'.join(lines) m = timeline_model.TimelineModel(event_data=text) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) - self.assertEqual(1, len(processes[0].GetThreadWithId(8).slices)) + self.assertEqual(1, len(processes[0].threads[8].all_slices)) def testStartFinishOneSliceOneThread(self): events = [ @@ -675,8 +663,11 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) - t = processes[0].GetThreadWithId(53) + + self.assertEqual(2, len(m.GetAllEvents())) + + processes = m.GetAllProcesses() + t = processes[0].threads[53] slices = t.async_slices self.assertEqual(1, len(slices)) self.assertEqual('a', slices[0].name) @@ -697,15 +688,15 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(53) - self.assertEqual(1, len(t.slices)) + t = p.threads[53] + self.assertEqual(1, len(t.all_slices)) self.assertEqual(53, t.tid) - slice_event = t.slices[0] + slice_event = t.all_slices[0] self.assertEqual('a', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertEqual(0, slice_event.start) @@ -721,13 +712,13 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(53) - slice_event = t.slices[0] + t = p.threads[53] + slice_event = t.all_slices[0] self.assertEqual('b', slice_event.name) self.assertEqual('foo', slice_event.category) self.assertEqual(0, slice_event.start) @@ -763,14 +754,14 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events, shift_world_to_zero=False) - processes = GetAllProcesses(m) + processes = m.GetAllProcesses() self.assertEqual(1, len(processes)) p = processes[0] self.assertEqual(1, len(p.threads)) - t = p.GetThreadWithId(53) + t = p.threads[53] - slice_a = t.slices[0] + slice_a = t.all_slices[0] self.assertEqual(4, len(slice_a.GetAllSubSlices())) self.assertEqual('a', slice_a.name) self.assertEqual(100 / 1000.0, slice_a.start) @@ -799,7 +790,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - t = GetAllProcesses(m)[0].GetThreadWithId(53) + t = m.GetAllProcesses()[0].threads[53] self.assertEqual(1, len(t.async_slices)) parent_slice = t.async_slices[0] self.assertEqual('c', parent_slice.name) @@ -822,7 +813,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - t = GetAllProcesses(m)[0].GetThreadWithId(53) + t = m.GetAllProcesses()[0].threads[53] self.assertEqual(1, len(t.async_slices)) parent_slice = t.async_slices[0] self.assertEqual('d', parent_slice.name) @@ -844,7 +835,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - t = GetAllProcesses(m)[0].GetThreadWithId(53) + t = m.GetAllProcesses()[0].threads[53] self.assertEqual(1, len(t.async_slices)) parent_slice = t.async_slices[0] self.assertEqual('a', parent_slice.name) @@ -877,7 +868,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - t = GetAllProcesses(m)[0].GetThreadWithId(53) + t = m.GetAllProcesses()[0].threads[53] self.assertTrue(t is not None) def testAsyncStepsMissingFinish(self): @@ -890,7 +881,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): ] m = timeline_model.TimelineModel(event_data=events) - t = GetAllProcesses(m)[0].GetThreadWithId(53) + t = m.GetAllProcesses()[0].threads[53] self.assertTrue(t is not None) def testImportSamples(self): @@ -903,8 +894,8 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 53, 'ph': 'P'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(53) + p = m.GetAllProcesses()[0] + t = p.threads[53] self.assertEqual(3, len(t.samples)) self.assertEqual(0.0, t.samples[0].start) self.assertEqual(0.0, t.samples[1].start) @@ -924,7 +915,7 @@ class TraceEventTimelineImporterTest(unittest.TestCase): 'tid': 53, 'ph': 'P'} ] m = timeline_model.TimelineModel(event_data=events) - p = GetAllProcesses(m)[0] - t = p.GetThreadWithId(53) + p = m.GetAllProcesses()[0] + t = p.threads[53] self.assertEqual(3, len(t.samples)) self.assertEqual(0, len(m.import_errors)) diff --git a/tools/telemetry/telemetry/core/timeline/tracing/__init__.py b/tools/telemetry/telemetry/core/timeline/tracing/__init__.py deleted file mode 100644 index 9228df8..0000000 --- a/tools/telemetry/telemetry/core/timeline/tracing/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# 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. diff --git a/tools/telemetry/telemetry/core/timeline/tracing/slice.py b/tools/telemetry/telemetry/core/timeline/tracing/slice.py deleted file mode 100644 index 178b33a..0000000 --- a/tools/telemetry/telemetry/core/timeline/tracing/slice.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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. - -import telemetry.core.timeline.event as timeline_event - -class Slice(timeline_event.TimelineEvent): - ''' A Slice represents an interval of time plus parameters associated - with that interval. - - NOTE: The Sample class implements the same interface as - Slice. These must be kept in sync. - - All time units are stored in milliseconds. - ''' - def __init__(self, category, name, timestamp, args=None, parent=None): - super(Slice, self).__init__( - name, timestamp, 0, args=args, parent=parent) - self._sub_slices = [] - self.category = category - self.did_not_finish = False - - @property - def sub_slices(self): - return self._sub_slices - - def AddSubSlice(self, sub_slice): - self._sub_slices.append(sub_slice) - - def _GetSubSlicesRecursive(self): - for sub_slice in self._sub_slices: - for s in sub_slice.GetAllSubSlices(): - yield s - yield sub_slice - - def GetAllSubSlices(self): - return list(self._GetSubSlicesRecursive()) - - def GetAllSubSlicesOfName(self, name): - return [e for e in self.GetAllSubSlices() if e.name == name] |