[webkit-changes] [WebKit/WebKit] 06391e: Add media element watchtime diagnostic logging
Jer Noble
noreply at github.com
Thu Aug 8 12:44:41 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 06391e123c0e3b40a30e1114af79cd61c4e2f603
https://github.com/WebKit/WebKit/commit/06391e123c0e3b40a30e1114af79cd61c4e2f603
Author: Jer Noble <jer.noble at apple.com>
Date: 2024-08-08 (Thu, 08 Aug 2024)
Changed paths:
M Source/WebCore/html/HTMLMediaElement.cpp
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/page/DiagnosticLoggingKeys.cpp
M Source/WebCore/page/DiagnosticLoggingKeys.h
Log Message:
-----------
Add media element watchtime diagnostic logging
https://bugs.webkit.org/show_bug.cgi?id=277747
rdar://133396572
Reviewed by Eric Carlson.
Add diagnostic logging of watchtime for various media properties. Specifically:
- Log watchtime separated by source type (HLS, live stream, media source, etc.)
- Log watchtime separated by video and audio codecs
For each of these watchtime log events, enable random sampling, so only a small
percentage of events will actually get logged. Additionally, break up watchtime
events into 5 minute intervals, which due to sampling, only some of which will
actually be logged.
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::~HTMLMediaElement):
(WebCore::HTMLMediaElement::mediaPlayerRateChanged):
(WebCore::HTMLMediaElement::clearMediaPlayer):
(WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
(WebCore::HTMLMediaElement::startWatchtimeTimer):
(WebCore::HTMLMediaElement::pauseWatchtimeTimer):
(WebCore::HTMLMediaElement::invalidateWatchtimeTimer):
(WebCore::HTMLMediaElement::watchtimeTimerFired):
* Source/WebCore/html/HTMLMediaElement.h:
* Source/WebCore/page/DiagnosticLoggingKeys.cpp:
(WebCore::DiagnosticLoggingKeys::mediaSourceTypeWatchTimeKey):
(WebCore::DiagnosticLoggingKeys::mediaVideoCodecWatchTimeKey):
(WebCore::DiagnosticLoggingKeys::mediaAudioCodecWatchTimeKey):
(WebCore::DiagnosticLoggingKeys::secondsKey):
(WebCore::DiagnosticLoggingKeys::sourceTypeKey):
(WebCore::DiagnosticLoggingKeys::videoCodecKey):
(WebCore::DiagnosticLoggingKeys::audioCodecKey):
(WebCore::DiagnosticLoggingKeys::mediaElementSourceTypeDiagnosticLoggingKey):
* Source/WebCore/page/DiagnosticLoggingKeys.h:
Canonical link: https://commits.webkit.org/282004@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list