Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stats that are not numbers (e.g. strings) #15

Open
henbos opened this issue Mar 4, 2020 · 4 comments
Open

Stats that are not numbers (e.g. strings) #15

henbos opened this issue Mar 4, 2020 · 4 comments

Comments

@henbos
Copy link

henbos commented Mar 4, 2020

It would be nice to be able to see what string value certain stats had, e.g. qualityLimitationReason, even though these are not numbers.

Suggestion 1: Value. Show a snapshot of the latest value readable as a string somewhere instead of filtering it out like it doesn't exist.
Suggestion 2: Graph. Map values to numbers so that they can be plotted on the graph, with a legend that shows which string each number maps to, or if you can tell my hovering the mouse over it. So you can see which point in time on the graph it had a particular value.
Suggestion 3: Pie chart. Show what % of time (i.e. how many stats samples compared to the total number of stats samples) the metric had each particular value that it had.

@henbos
Copy link
Author

henbos commented Mar 4, 2020

Suggestion 2 would probably be the most useful.

If the mapping from string to number converted alphanumeric characters to numbers in a predictable way that would be good because then you could import multiple different dumps and each time you would see the same mappings. As opposed to "0" mapping to whatever the first encountered string was, in that case you could have different dumps have very different looking graphs even though they had very similar data.

@fippo
Copy link
Owner

fippo commented Mar 4, 2020

the mappings have probably to be hardcoded from the spec.

@henbos
Copy link
Author

henbos commented Mar 4, 2020

Suggestion:

  1. Put all known enum values from the spec into a list and sort it by name.
  2. Also insert any values that you see in getStats (this would only have an effect if there was something missing from step 1).
  3. List index = the mapping

This would give you consistent values between dumps and most versions.

Only in the event that new values are added to the spec, or an unknown value is present in getStats, would you different mappings than you're used to, but that would be rare and the dump's graphs would still be very readable

@fippo
Copy link
Owner

fippo commented Nov 7, 2022

QQ: can we add a valueType to the webrtc-internals dump? This type would be a stringification of the RTCStatsMember

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants