Re: RFC: WebApp timing

On Wed, Aug 12, 2009 at 6:12 PM, Zhiheng Wang <zhihengw@google.com> wrote:

> Hello,
>
>    We recently started a draft to provide timing-related APIs in browsers.
> The goal is to add the missing pieces in webapp latency measurements using
> Javascript. As a starter, right now we've only include a
> minimum set of interfaces we consider necessary, which mainly focuse on the
> time and type of the
> navigation.
>
>    The first cut of the draft is attached below. It's sketchy but should
> hold much of our ideas. We are
> still actively working on it. Any interest and feedback on the draft are
> highly welcome.
>

Is this a place that app specific timing would be useful to add or is that
already covered somewhere else?

In other words, I'm looking for an API that helps me do this

var timer = new Timer();
timer.start();
for (var x = 0; x < 10; ++x) { }
var elapsedTime = timer.elapsedTime;
document.write("loop took " + elapsedTime + " seconds");

Where elapsedTime is some relatively high precision number so this might
print

loop took 0.00000145 seconds

(using Date, which only has a precision of milliseconds, is not enough)


>
> cheers,
> Zhiheng
>

Received on Thursday, 13 August 2009 07:08:35 UTC