Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Issue 1788783002: Add macros for ability to log samples that are added to histograms (RTC_LOGGED_*). (Closed)

Created:
4 years, 9 months ago by åsapersson
Modified:
4 years, 3 months ago
CC:
webrtc-reviews_webrtc.org, video-team_agora.io, henrika_webrtc, zhengzhonghou_agora.io, stefan-webrtc, tterriberry_mozilla.com, fengyue_agora.io, peah-webrtc, mflodman
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Add macros for ability to log samples that are added to histograms (RTC_LOGGED_*). Adds logging of: - video stats that are recorded when a stream is removed - bitrate stats that are recorded at the end of a call - initial bwe rampup stats BUG= Committed: https://crrev.com/58d992e02511219ec59b13589a30e4d74d420da3 Cr-Commit-Position: refs/heads/master@{#12133}

Patch Set 1 #

Patch Set 2 : rebase #

Total comments: 2

Patch Set 3 : address comment #

Patch Set 4 : RTC_L* -> RTC_LOGGED* #

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+187 lines, -118 lines) Patch
M webrtc/call/call.cc View 1 2 3 2 chunks +11 lines, -11 lines 0 comments Download
M webrtc/modules/bitrate_controller/send_side_bandwidth_estimation.cc View 1 2 3 2 chunks +10 lines, -10 lines 0 comments Download
M webrtc/modules/video_coding/codecs/vp8/screenshare_layers.cc View 1 1 chunk +8 lines, -8 lines 0 comments Download
M webrtc/modules/video_coding/jitter_buffer.cc View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M webrtc/modules/video_coding/timing.cc View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M webrtc/system_wrappers/include/metrics.h View 1 2 3 4 chunks +65 lines, -3 lines 0 comments Download
M webrtc/video/call_stats.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M webrtc/video/receive_statistics_proxy.cc View 1 2 3 2 chunks +31 lines, -26 lines 0 comments Download
M webrtc/video/send_statistics_proxy.cc View 1 2 3 5 chunks +47 lines, -46 lines 0 comments Download
M webrtc/video/vie_receiver.cc View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download

Messages

Total messages: 27 (11 generated)
åsapersson
4 years, 9 months ago (2016-03-15 08:11:59 UTC) #5
stefan-webrtc
LG, but roughly how much logging does this introduce? Just 20 or so extra logs ...
4 years, 9 months ago (2016-03-15 10:14:10 UTC) #6
åsapersson
On 2016/03/15 10:14:10, stefan-webrtc (holmer) wrote: > LG, but roughly how much logging does this ...
4 years, 9 months ago (2016-03-15 12:46:11 UTC) #8
åsapersson
https://codereview.webrtc.org/1788783002/diff/40001/webrtc/system_wrappers/include/metrics.h File webrtc/system_wrappers/include/metrics.h (right): https://codereview.webrtc.org/1788783002/diff/40001/webrtc/system_wrappers/include/metrics.h#newcode19 webrtc/system_wrappers/include/metrics.h:19: #include "webrtc/system_wrappers/include/logging.h" On 2016/03/15 10:14:10, stefan-webrtc (holmer) wrote: > ...
4 years, 9 months ago (2016-03-15 12:46:23 UTC) #9
stefan-webrtc
Seems reasonable then. lgtm
4 years, 9 months ago (2016-03-15 14:44:39 UTC) #10
pbos-webrtc
Should we call these RTC_LOGGED_HISTOGRAM_? I find LHISTOGRAM hard to read.
4 years, 9 months ago (2016-03-15 18:12:13 UTC) #11
åsapersson
On 2016/03/15 18:12:13, pbos-webrtc wrote: > Should we call these RTC_LOGGED_HISTOGRAM_? I find LHISTOGRAM hard ...
4 years, 9 months ago (2016-03-16 08:45:25 UTC) #13
pbos-webrtc
lgtm
4 years, 9 months ago (2016-03-16 11:18:20 UTC) #14
mflodman
lgtm
4 years, 8 months ago (2016-03-29 07:52:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1788783002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1788783002/100001
4 years, 8 months ago (2016-03-29 08:15:54 UTC) #18
commit-bot: I haz the power
Committed patchset #5 (id:100001)
4 years, 8 months ago (2016-03-29 09:15:11 UTC) #20
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/58d992e02511219ec59b13589a30e4d74d420da3 Cr-Commit-Position: refs/heads/master@{#12133}
4 years, 8 months ago (2016-03-29 09:15:20 UTC) #22
tommi
What do you think about backing out of this change? The UMA macros are more ...
4 years, 3 months ago (2016-09-08 14:43:03 UTC) #24
pbos-webrtc
On 2016/09/08 14:43:03, tommi (webrtc) wrote: > What do you think about backing out of ...
4 years, 3 months ago (2016-09-08 14:47:00 UTC) #25
tommi
On 2016/09/08 14:47:00, pbos-webrtc wrote: > On 2016/09/08 14:43:03, tommi (webrtc) wrote: > > What ...
4 years, 3 months ago (2016-09-08 15:08:37 UTC) #26
pbos-webrtc
4 years, 3 months ago (2016-09-08 15:52:26 UTC) #27
Message was sent while issue was closed.
On 2016/09/08 15:08:37, tommi (webrtc) wrote:
> On 2016/09/08 14:47:00, pbos-webrtc wrote:
> > On 2016/09/08 14:43:03, tommi (webrtc) wrote:
> > > What do you think about backing out of this change?
> > > 
> > > The UMA macros are more and more being used for doing both UMA and
logging,
> > yet
> > > these things do not have the same design goals or satisfy the same need.
> > > A specific goal of UMA, is to be as efficient as possible and reasonably
> cheap
> > > as far as code goes. Not get in the way while still allowing us to
measure.
> > > 
> > > With this change, *every* call site has a LOG() statement (which matters
> > > regardless of whether it will be executed or not), which means a sizable
> chunk
> > > of code + dependency on iostream.
> > > 
> > > I don't want to encourage mixing these two things (logging and stats), so
I
> > > would rather want to put it on the caller to control how logging is done
for
> > the
> > > places that need it, rather than make logging a feature of UMA stats.  I
> also
> > > can't find a precedence (e.g. in Chrome).
> > 
> > Personally I've found it very useful when debugging user logs, when a call
> ends
> > UMA logs the stats for all of that call. The same stats have been very
useful
> to
> > determine overall call quality in terms of packet loss over entire call. I
> think
> > we shouldn't necessarily log all UMA stats, but I don't think that we need
to
> > prevent it if it's added consciously.
> 
> I can see that that sort of information is useful.  However, do you think that
> this is the way to record that information?

I think the macros are useful, but we could replace the inline LOG(LS_INFO) <<
constant_name << " " << sample; with a function call. Something like
LogHistogram(__FILE__, __LINE__, constant_name, sample).

Then we'd take the code-size cost for logging only once instead of
per-invocation. Am I correct in assuming that your primary concern here is code
size/bloat or do you think we log too much data?

Powered by Google App Engine
This is Rietveld 408576698