<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>30685</bug_id>
          
          <creation_ts>2009-10-22 12:03:35 -0700</creation_ts>
          <short_desc>Implement WebTiming feature.</short_desc>
          <delta_ts>2017-07-24 13:33:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://dev.w3.org/2006/webapi/WebTiming/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>38924</dependson>
    
    <dependson>41332</dependson>
    
    <dependson>41437</dependson>
    
    <dependson>41442</dependson>
    
    <dependson>41525</dependson>
    
    <dependson>41533</dependson>
    
    <dependson>41564</dependson>
    
    <dependson>41815</dependson>
    
    <dependson>41816</dependson>
    
    <dependson>41824</dependson>
    
    <dependson>42006</dependson>
    
    <dependson>42018</dependson>
    
    <dependson>42034</dependson>
    
    <dependson>42282</dependson>
    
    <dependson>42303</dependson>
    
    <dependson>42313</dependson>
    
    <dependson>42432</dependson>
    
    <dependson>42433</dependson>
    
    <dependson>42434</dependson>
    
    <dependson>42435</dependson>
    
    <dependson>42473</dependson>
    
    <dependson>42477</dependson>
    
    <dependson>42512</dependson>
    
    <dependson>42607</dependson>
    
    <dependson>42772</dependson>
    
    <dependson>42797</dependson>
    
    <dependson>43083</dependson>
    
    <dependson>46301</dependson>
    
    <dependson>46302</dependson>
    
    <dependson>46306</dependson>
    
    <dependson>48919</dependson>
    
    <dependson>48920</dependson>
    
    <dependson>48922</dependson>
    
    <dependson>48923</dependson>
    
    <dependson>48924</dependson>
    
    <dependson>49101</dependson>
    
    <dependson>49294</dependson>
    
    <dependson>50400</dependson>
    
    <dependson>50943</dependson>
    
    <dependson>51200</dependson>
    
    <dependson>53305</dependson>
    
    <dependson>55068</dependson>
    
    <dependson>58354</dependson>
    
    <dependson>59448</dependson>
    
    <dependson>62689</dependson>
    
    <dependson>84705</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel Feldman">pfeldman</reporter>
          <assigned_to name="Tony Gentilcore">tonyg</assigned_to>
          <cc>ap</cc>
    
    <cc>bburg</cc>
    
    <cc>ddkilzer</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>jdapena</cc>
    
    <cc>joepeck</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>peter</cc>
    
    <cc>sam</cc>
    
    <cc>simonjam</cc>
    
    <cc>tonyg</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>156964</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2009-10-22 12:03:35 -0700</bug_when>
    <thetext>&lt;&lt; Pasting proposal details below &gt;&gt;

User latency is an important quality benchmark for Web Applications. While JavaScript-based mechanisms can provide comprehensive instrumentations for user latency measurements within an application, in many cases, they are unable to provide a complete end-to-end latency picture.

For example, the following Javascript shows the time it take to fully load a page:

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
var start = new Date().getTime();
function onLoad() {
  var now = new Date().getTime();
  var latency = now - start;
  alert(&quot;page loading time: &quot; + latency);
}
&lt;script&gt;
&lt;/head&gt;
&lt;body onload=&quot;onLoad()&quot;&gt;
&lt;!- Main page body goes from here. --&gt;
&lt;/body&gt;
&lt;/html&gt;

The script calculates the time it takes to load the page after the first bit of JavaScript in the head is executed, but it does not give any information about the time it takes to get the page from the server.

To address the need for complete information on the user experience, this document introduces the Timing interface. This interface allows JavaScript mechanisms to provide complete client-side latency measurements within applications. With the proposed interface, the previous example could be modified to provide information about user&apos;s perceived page load time.

The following script calculates how much time has elapsed since the occurance of a navigation event, such as the mouse click on a link.

&lt;html&gt;
&lt;head&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
function onLoad() {
  var now = new Date().getTime();
  var latency = now - window.pageTiming.navigationTime;
  alert(&quot;User-perceived page loading time: &quot; + latency);
}
&lt;script&gt;
&lt;/head&gt;
&lt;body onload=&quot;onLoad()&quot;&gt;
&lt;!- Main page body goes from here. --&gt;
&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156965</commentid>
    <comment_count>1</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2009-10-22 12:04:51 -0700</bug_when>
    <thetext>I don&apos;t think this needs to be tied to the Inspector, but maybe it should be?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156967</commentid>
    <comment_count>2</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2009-10-22 12:10:28 -0700</bug_when>
    <thetext>Here is how I can see this implemented.

- Report this timing information into inspector controller along with the timeline figures.
- Capture the data even when InspectorController is not enabled.
- Seed window.pageTiming getter function into the global object from within inspectedWindowScriptObjectCleared callback.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>156968</commentid>
    <comment_count>3</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2009-10-22 12:13:23 -0700</bug_when>
    <thetext>It seems better to just have the data recorded on the WebCore::Page or Document, or something. And have a real DOM binding to expose it (no injection.) We don&apos;t do any injection like you describe for real DOM API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>253801</commentid>
    <comment_count>4</comment_count>
    <who name="Tony Gentilcore">tonyg</who>
    <bug_when>2010-07-20 10:32:34 -0700</bug_when>
    <thetext>The core Web Timing implementation is now working and enabled for the chromium port. I&apos;m leaving this bug open to track the 4 remaining bugs to enable Web Timing for the gtk, mac, qt and win ports.

It is exposed as window.webkitPerformance as I suspect the spec still has a little bit of evolving to do. At some point, I expect this will become window.performance.

For reference, here are links to IE9&apos;s announcement of window.msPerformance and Mozilla&apos;s bug for window.mozPerformance:
 - http://blogs.msdn.com/b/ie/archive/2010/06/28/measuring-web-page-performance.aspx
 - https://bugzilla.mozilla.org/show_bug.cgi?id=570341</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1275484</commentid>
    <comment_count>5</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2017-02-10 12:26:29 -0800</bug_when>
    <thetext>- WEB_TIMING is enabled by default on all ports.
- `performance` APIs are available on all ports.

Lets close this umbrella bug!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1331720</commentid>
    <comment_count>6</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-07-24 13:33:10 -0700</bug_when>
    <thetext>*** Bug 96107 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1331722</commentid>
    <comment_count>7</comment_count>
    <who name="Blaze Burg">bburg</who>
    <bug_when>2017-07-24 13:33:53 -0700</bug_when>
    <thetext>*** Bug 61138 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>