New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 735953 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Task



Sign in to add a comment

Web MIDI: Add some more metrics to track real API usages

Project Member Reported by toyoshim@chromium.org, Jun 22 2017

Issue description

Today, requestMIDIAccess is called by feature scanning scripts, and that does not tell us a real usage.

To estimate more real numbers, let's add some more metrics both in Blink and backend.

Probably, send() method, and midimessage event handling would be monitored in Blink side.

Also, the backend would track real incoming / outgoing message traffic as we already do for sysex messages.
 
Cc: scheib@chromium.org cwilso@chromium.org
Status: Started (was: Assigned)
Project Member

Comment 3 by bugdroid1@chromium.org, Jun 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a1b311504c8a127641a38727f7783e9f3ef9aaad

commit a1b311504c8a127641a38727f7783e9f3ef9aaad
Author: Takashi Toyoshima <toyoshim@chromium.org>
Date: Tue Jun 27 11:39:59 2017

Web MIDI: track real data transaction to estimate real API usage

BUG= 735953 

Change-Id: I41906f31276b9095719ca7f5c2428647018439a2
Reviewed-on: https://chromium-review.googlesource.com/545555
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#482596}
[modify] https://crrev.com/a1b311504c8a127641a38727f7783e9f3ef9aaad/media/midi/midi_manager.cc
[modify] https://crrev.com/a1b311504c8a127641a38727f7783e9f3ef9aaad/media/midi/midi_manager.h
[modify] https://crrev.com/a1b311504c8a127641a38727f7783e9f3ef9aaad/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/a1b311504c8a127641a38727f7783e9f3ef9aaad/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Started)

Comment 5 by scheib@chromium.org, Jun 27 2017

Some of the existing metrics are not useful because sites are using them for non-web-midi uses. I'd like to remove them, or at least annotate their names, so that when someone searches for web midi UMA they can find quickly find the meaningful metrics.

What do you think?
Status: Started (was: Fixed)
Probably, we may want to keep them for tracking malicious usage too.
At this point, we can catch a malicious usage spike by monitoring permission metrics, but it's still useful to double check it with Web MIDI metrics for a while.

I could update metrics.xml to clarify this point. But it can not cover Blink side UseCounter based metrics. I have no good idea for UseCounter, and the problem is we already have many useless UseCounter that feature scanning scripts break.

Comment 7 by scheib@chromium.org, Jun 28 2017

Good points. Usecounter feature names can be decorated, such as existingName_ObscuredByFootprinting.

Ah, we can change the name!
Got it, let me rename it.
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 29 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d4d629b3cd4cfef647a3a4b328b34ded9e32866

commit 7d4d629b3cd4cfef647a3a4b328b34ded9e32866
Author: Takashi Toyoshima <toyoshim@chromium.org>
Date: Thu Jun 29 20:18:02 2017

Web MIDI: update histograms.xml descriptions for MIDI usage tracking

Since now MidiUsage is completely useless to track actual API use count,
but is still useful to monitor unexpected failures on initializing
platform dependent MIDI stuff, let's update description.

BUG= 735953 

Change-Id: I69ba7744354c496c39e708dc9abd522c2d8d753e
Reviewed-on: https://chromium-review.googlesource.com/551119
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#483464}
[modify] https://crrev.com/7d4d629b3cd4cfef647a3a4b328b34ded9e32866/tools/metrics/histograms/histograms.xml

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf

commit 877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf
Author: Takashi Toyoshima <toyoshim@chromium.org>
Date: Thu Jul 06 10:10:04 2017

Web MIDI: decorate UseCounter name

Today, UseCounter items for requestMIDIAccess() are obscured by
unexpected use cases, such as footprinting.
Since this is confusing for people who want to track real API usage,
let's rename it to say this is not an UseCount you want.

Bug:  735953 
Change-Id: I3f58645004069aced6f1f0d5bc8deda4ebdda3b9
Reviewed-on: https://chromium-review.googlesource.com/554650
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Reviewed-by: Vincent Scheib <scheib@chromium.org>
Commit-Queue: Takashi Toyoshima <toyoshim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484525}
[modify] https://crrev.com/877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.cpp
[modify] https://crrev.com/877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf/third_party/WebKit/Source/modules/webmidi/NavigatorWebMIDI.idl
[modify] https://crrev.com/877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf/third_party/WebKit/public/platform/web_feature.mojom
[modify] https://crrev.com/877e845ac9f96f06a8f08268ef02ffd5a4d0b9cf/tools/metrics/histograms/enums.xml

Status: Fixed (was: Started)

Sign in to add a comment