W3C home > Mailing lists > Public > public-web-perf@w3.org > February 2014

Re: Notification for new navigation timing entries

From: Joshua Peek <josh@joshpeek.com>
Date: Fri, 28 Feb 2014 15:19:41 -0600
Message-ID: <CA+RmjJKKgU-=uS5C05Sps-9DsVsOpPZ5XakZrYWxtfm3yHhLbw@mail.gmail.com>
To: Ilya Grigorik <igrigorik@google.com>
Cc: public-web-perf <public-web-perf@w3.org>
For user timings, we're already using a wrapper as you mentioned.
However, I'd prefer to use the standard interface. Its also possible
for libraries outside my control to set new marks that I'd like to
report.

New resource timing data is often outside of the user's control. New
images and scripts can be appended dynamically.

On Fri, Feb 28, 2014 at 12:49 PM, Ilya Grigorik <igrigorik@google.com> wrote:
>
> On Mon, Feb 17, 2014 at 9:33 AM, Joshua Peek <josh@joshpeek.com> wrote:
>>
>> Theres no notification when
>> new performance entries have been recorded. This requires invasive
>> code to recheck the performance entries buffer.
>
>
> Josh, why wouldn't you just use measure / clearMarks? I don't think you need
> to traverse the full buffer.
>
> function markIt(name) {
>   performance.mark(name); // or use measure with optional start/end params
>   // grab the timing data, do what you need to do with it
>   performance.clearMarks(name);
> }
>
> // your code
> markIt("some-event");
> // more code
> markIt("other-event");
>
> Point being, you know when the event is available.. it's when you call mark.
> For NavTiming this happens to be after onloadEnd.
>
> ig
Received on Friday, 28 February 2014 21:20:09 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:04:38 UTC