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

Issue 2567243003: RTCStatsCollector: Utilize network thread to minimize thread hops. (Closed)

Created:
4 years ago by hbos
Modified:
4 years ago
CC:
webrtc-reviews_webrtc.org, the sun, tterriberry_mozilla.com
Target Ref:
refs/heads/master
Project:
webrtc
Visibility:
Public.

Description

RTCStatsCollector: Utilize network thread to minimize thread hops. The previously used WebRtcSession::GetTransportStats did a synchronous invoke per channel (voice, video, data) on the signaling thread to the network thread - e.g. 3 blocking invokes. It is replaced by WebRtcSession::GetSessionStats which can be invoked on the signaling thread or on any thread if a ChannelNamePairs argument is present (provided by WebRtcSession::GetChannelNamePairs on the signaling thread). With these changes, and changes allowing the getting of certificates from any thread, the RTCStatsCollector can turn the 3 blocking thread invokes into 1 non-blocking invoke. BUG=webrtc:6875, chromium:627816

Patch Set 1 #

Total comments: 20

Patch Set 2 : GetSessionStats replacing GetTransportStats, getting certificate from any thread #

Total comments: 9

Patch Set 3 : Addressed comments #

Total comments: 12

Patch Set 4 : Addressed comments #

Patch Set 5 : Rebase /w master and GetSessionStats renamed GetStats #

Total comments: 1

Patch Set 6 : Rebase and rename Get[Session]Stats_n #

Unified diffs Side-by-side diffs Delta from patch set Stats (+285 lines, -173 lines) Patch
M webrtc/api/rtcstatscollector.h View 1 2 4 chunks +15 lines, -7 lines 0 comments Download
M webrtc/api/rtcstatscollector.cc View 1 2 3 4 11 chunks +60 lines, -48 lines 0 comments Download
M webrtc/api/rtcstatscollector_unittest.cc View 1 2 3 4 13 chunks +46 lines, -34 lines 0 comments Download
M webrtc/api/statscollector.cc View 1 2 3 4 2 chunks +4 lines, -4 lines 0 comments Download
M webrtc/api/statscollector_unittest.cc View 1 2 3 4 17 chunks +77 lines, -43 lines 0 comments Download
M webrtc/api/test/mock_webrtcsession.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M webrtc/api/webrtcsession.h View 1 2 3 4 5 5 chunks +27 lines, -5 lines 0 comments Download
M webrtc/api/webrtcsession.cc View 1 2 3 4 5 2 chunks +43 lines, -28 lines 0 comments Download
M webrtc/api/webrtcsession_unittest.cc View 1 2 3 4 1 chunk +2 lines, -3 lines 0 comments Download
M webrtc/p2p/base/transportcontroller.cc View 1 2 3 4 3 chunks +9 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (38 generated)
hbos
Please take a look, hta and deadbeef. https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.h File webrtc/api/rtcstatscollector.h (right): https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.h#newcode31 webrtc/api/rtcstatscollector.h:31: #include "webrtc/p2p/base/jseptransport.h" ...
4 years ago (2016-12-13 14:14:34 UTC) #8
Taylor Brandstetter
I agree with the concept of this CL, but I'd prefer if we could do ...
4 years ago (2016-12-13 19:47:07 UTC) #12
pthatcher1
https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc#newcode421 webrtc/api/rtcstatscollector.cc:421: channel_name_pairs_.reset(pc_->session()->GetChannelNamePairs().release()); On 2016/12/13 19:47:07, Taylor Brandstetter wrote: > I ...
4 years ago (2016-12-13 23:50:19 UTC) #13
Taylor Brandstetter
https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc#newcode466 webrtc/api/rtcstatscollector.cc:466: pc_->session()->GetSessionStats_n(*channel_name_pairs_); On 2016/12/13 23:50:19, pthatcher1 wrote: > On 2016/12/13 ...
4 years ago (2016-12-14 00:10:25 UTC) #14
hbos
PTAL deadbeef, pthatcher. I removed GetTransportStats in favor of GetSessionStats. It can either be invoked ...
4 years ago (2016-12-14 14:56:31 UTC) #20
Taylor Brandstetter
I still feel this could be simplified a bit, but I don't feel strongly enough ...
4 years ago (2016-12-15 01:12:54 UTC) #23
hta-webrtc
lgtm https://codereview.webrtc.org/2567243003/diff/60001/webrtc/api/rtcstatscollector.h File webrtc/api/rtcstatscollector.h (right): https://codereview.webrtc.org/2567243003/diff/60001/webrtc/api/rtcstatscollector.h#newcode156 webrtc/api/rtcstatscollector.h:156: std::unique_ptr<ChannelNamePairs> channel_name_pairs_; Add a comment saying that these ...
4 years ago (2016-12-15 14:02:44 UTC) #24
hbos
Do you want to take another look pthatcher? Otherwise I'll land this tomorrow. https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc File ...
4 years ago (2016-12-15 16:12:45 UTC) #25
Taylor Brandstetter
https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc#newcode454 webrtc/api/rtcstatscollector.cc:454: // method. On 2016/12/15 16:12:45, hbos wrote: > On ...
4 years ago (2016-12-15 17:35:20 UTC) #26
pthatcher1
https://codereview.webrtc.org/2567243003/diff/80001/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2567243003/diff/80001/webrtc/api/rtcstatscollector.cc#newcode482 webrtc/api/rtcstatscollector.cc:482: pc_->session()->GetSessionStats(*channel_name_pairs_); I don't understand why you can't just call ...
4 years ago (2016-12-15 23:19:00 UTC) #27
hbos
PTAL pthatcher https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc File webrtc/api/rtcstatscollector.cc (right): https://codereview.webrtc.org/2567243003/diff/1/webrtc/api/rtcstatscollector.cc#newcode454 webrtc/api/rtcstatscollector.cc:454: // method. On 2016/12/15 17:35:19, Taylor Brandstetter ...
4 years ago (2016-12-16 10:38:03 UTC) #32
hbos
NOTE: There's something going on with the CQ, I can't run it on this patch, ...
4 years ago (2016-12-16 13:56:01 UTC) #50
pthatcher1
4 years ago (2016-12-16 21:31:19 UTC) #51
Message was sent while issue was closed.
lgtm

https://codereview.webrtc.org/2567243003/diff/140001/webrtc/api/webrtcsession.cc
File webrtc/api/webrtcsession.cc (right):

https://codereview.webrtc.org/2567243003/diff/140001/webrtc/api/webrtcsession...
webrtc/api/webrtcsession.cc:1712: std::unique_ptr<SessionStats>
WebRtcSession::GetSessionStats_n(
GetStats_n

Powered by Google App Engine
This is Rietveld 408576698