[User Timing] Integration with Performance Timeline

Hi web-perf fans,

I was inspired to review the User Timing patch after seeing patches posted
for it to WebKit. It looks like there's one thing we could clean up now
that we have the Performance Timeline spec.

getMeasures() and getMarks() should be replaced by getEntriesByType() and
getEntriesByName(). The whole point is to have a single interface instead
of each timing spec adding its own accessors.

I realize part of this was to get the clever behavior of returning a
PerformanceEntry instead of an array if there's only one, but I think that
feature will end up confusing users (how are they supposed to code for
it?). Plus I doubt it's compliant with WebIDL.

James

Received on Monday, 9 July 2012 21:01:18 UTC