W3C home > Mailing lists > Public > public-webrtc@w3.org > January 2017

Re: Idea: "Enable" function for stats members?

From: Peter Thatcher <pthatcher@google.com>
Date: Fri, 20 Jan 2017 19:13:11 +0000
Message-ID: <CAJrXDUGSGWWBnFk7t63K3c+7sb=9aOru2F9VMfXkozKSp+QvMg@mail.gmail.com>
To: Harald Alvestrand <harald@alvestrand.no>, "public-webrtc@w3.org" <public-webrtc@w3.org>
We've had a similar problem in the past where someone wants only part of
the stats and is paying a performance penalty for collecting all the
stats.  So I like the idea of being able to opt into stats, and maybe opt
out of, stats.

But could we not just make it a filter of some sort passed into getStats?
Perhaps something like this:
{
  "newStat": true,  // I want it
  "oldStat": false,  // I don't want it
}

But perhaps that's over-engineering it.

On Wed, Jan 4, 2017 at 1:16 AM Harald Alvestrand <harald@alvestrand.no>
wrote:

[Trying out pinging the list instead of / before raising an issue]

Happy new year, everyone!

In preparing for the switch from Chrome's nonstandard "getStats" call to
the standard, we've found some issues with the changeover, which we
think will be reflected in future work on extending the stats model.

Namely:

- There's no way of figuring out who uses a stats field. This means that
we can't tell if it's safe to delete it.

- There's no way to add "experimental" stats fields and have them only
impact implementations that actively want to use it. If we add a stat,
it will show up for everyone.

One possibility I've considered is to add API for this - something like
this:

pc.EnableExperimentalStats("peer-connection", "deeplyStrangeStatistic")
.then(function(neededEnabling) {
    if (neededEnabling) {
        log('deeplyStrangeStatistic is enabled for experimentation')
    } else {
        log('deeplyStrangeStatistic is now part of the spec, stop
bothering me')
    }
})
.catch(e => log('Cant enable deeplyStrangeStatistic, platform may not
have implemented it')

This would allow:

- JS to know if the statistic is availble or not
- The UA to collect stats on if anyone's using the non-standard statistic
- The UA to emit deprecation messages for "going to be deleted"
experimental statistics (because there's a JS call that can trigger the
deprecation message)

Floating this as an idea. Does it make sense to people?
Received on Friday, 20 January 2017 19:13:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:50 UTC