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

Issue 6736009: Measure bandwidth for chromoting video channel (Closed)

Created:
9 years, 9 months ago by Alpha Left Google
Modified:
9 years, 6 months ago
Reviewers:
dmac, Wez, simonmorris
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org
Visibility:
Public.

Description

Measure bandwidth for chromoting video channel Define RunningAverage, TimedRunningAverage and use that to record video bandwidth. This doesn't account for overhead of protobuf envelop. However the number should be small that can be ignored. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80486

Patch Set 1 #

Total comments: 6

Patch Set 2 : added rate counter #

Total comments: 17

Patch Set 3 : done #

Unified diffs Side-by-side diffs Delta from patch set Stats (+302 lines, -3 lines) Patch
A remoting/base/rate_counter.h View 1 2 1 chunk +61 lines, -0 lines 0 comments Download
A remoting/base/rate_counter.cc View 1 2 1 chunk +49 lines, -0 lines 0 comments Download
A remoting/base/running_average.h View 1 2 1 chunk +57 lines, -0 lines 0 comments Download
A remoting/base/running_average.cc View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
M remoting/client/chromoting_client.h View 4 chunks +10 lines, -3 lines 0 comments Download
M remoting/client/chromoting_client.cc View 2 chunks +7 lines, -0 lines 0 comments Download
A remoting/client/chromoting_stats.h View 1 1 chunk +29 lines, -0 lines 0 comments Download
A remoting/client/chromoting_stats.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download
M remoting/client/plugin/chromoting_instance.h View 1 2 2 chunks +4 lines, -0 lines 0 comments Download
M remoting/client/plugin/chromoting_instance.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M remoting/client/plugin/chromoting_scriptable_object.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M remoting/client/plugin/chromoting_scriptable_object.cc View 4 chunks +11 lines, -0 lines 0 comments Download
M remoting/remoting.gyp View 1 2 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Alpha Left Google
9 years, 9 months ago (2011-03-24 22:06:35 UTC) #1
simonmorris
http://codereview.chromium.org/6736009/diff/1/remoting/base/running_average.cc File remoting/base/running_average.cc (right): http://codereview.chromium.org/6736009/diff/1/remoting/base/running_average.cc#newcode69 remoting/base/running_average.cc:69: return 1000.0 * average / delta.InMilliseconds(); I'm not sure ...
9 years, 9 months ago (2011-03-25 09:24:59 UTC) #2
Wez
Drive-by... Sorry, I'm not clear on what this change is intended to achieve, other than ...
9 years, 9 months ago (2011-03-25 10:43:19 UTC) #3
Alpha Left Google
On 2011/03/25 10:43:19, Wez wrote: > Drive-by... > > Sorry, I'm not clear on what ...
9 years, 9 months ago (2011-03-28 16:29:02 UTC) #4
Alpha Left Google
I've added RateCounter that does sum of value / time window. Also verified with iftop ...
9 years, 9 months ago (2011-03-28 18:47:23 UTC) #5
Alpha Left Google
ping. please review this patch.
9 years, 8 months ago (2011-04-01 19:40:26 UTC) #6
simonmorris
Sorry for the slow review. http://codereview.chromium.org/6736009/diff/8001/remoting/base/rate_counter.cc File remoting/base/rate_counter.cc (right): http://codereview.chromium.org/6736009/diff/8001/remoting/base/rate_counter.cc#newcode10 remoting/base/rate_counter.cc:10: : time_window_(time_window) { Initialise ...
9 years, 8 months ago (2011-04-04 10:27:34 UTC) #7
Alpha Left Google
http://codereview.chromium.org/6736009/diff/8001/remoting/base/rate_counter.cc File remoting/base/rate_counter.cc (right): http://codereview.chromium.org/6736009/diff/8001/remoting/base/rate_counter.cc#newcode10 remoting/base/rate_counter.cc:10: : time_window_(time_window) { On 2011/04/04 10:27:34, simonmorris wrote: > ...
9 years, 8 months ago (2011-04-05 00:16:06 UTC) #8
simonmorris
9 years, 8 months ago (2011-04-05 10:58:10 UTC) #9
On 2011/04/05 00:16:06, Alpha wrote:
> On 2011/04/04 10:27:34, simonmorris wrote:
> > It might be worth adding a Record(int64, base::Time) and a
> > Rate(base::Time), so this class can be unit tested.
> 
> How is this related to unit testing? I mean this interface can
> be unit tested too, is it?
> 

To unit test this class, you'd need to sleep between calls to
Record() and Rate(), and then hope the unit test doesn't sleep too
long, which some day it will. If you added versions of Record()
and Rate() that take time parameters, and let the existing Record()
and Rate() call those extended versions with Time::now(), then you
could reliably simulate the passing of time in a unit test.
Put another way, I'm suggesting injecting the dependency on time.

That could be a separate CL, though, so LGTM.

Powered by Google App Engine
This is Rietveld 408576698