Re: Stats v2 proposal - for Thursday's meeting

On 12/12/2012 11:18 AM, Stefan Hakansson LK wrote:
> On 12/11/2012 04:48 PM, Harald Alvestrand wrote:
>> Enclosed is my stats v2 proposal, as it stands today.
>> Things to note:
>>
>> - Using the dictionary *grammar* to describe objects, without making
>> dictionary *objects* (since that's impossible to implement due to some
>> WebKit limitations).
>> - Using an unique "id" to point between different objects inside the
>> stats DB.
>> - Focusing on the objects that need defining, expecting to fill in the
>> stats references later.
>>
>> I think this looks cleaner. It's obvious (to me, at least) where to add
>> the stats that aren't included yet.
>> It's only 6 pages, including the introduction and a code example.
>
> I think it would be cleaner if we did the object orientation thing we 
> did for DTMF for stats as well. So, instead of doing
>
> pc.getStats(selector, callbakcfunction);
>
> you'd do
>
> var statsReporter = pc.createStatsObject(selector);
>
> and then using the statsReporter object to obtain stats.
Are you thinking of a new statsreporter object whenever one wants stats 
(so that the statsreporter provides access to a snapshot), or a 
statsreporter object that has only a getStats method?

In the latter case, I don't see enough justificiation for the extra 
object, but this is a matter of taste.

>
>
>
>>
>> Comments welcome - more on Thursday!
>>
>>              Harald
>>
>
>

Received on Wednesday, 12 December 2012 10:47:38 UTC