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

Issue 2859353003: [BattOr] Reduce StartTracing time by about four seconds.

Created:
3 years, 7 months ago by aschulman
Modified:
3 years, 6 months ago
CC:
chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[BattOr] Reduce StartTracing time by about four seconds. The BattOr automatically resets if the INIT message is received more than once. Therefore, the first INIT message sent after a trace has completed will inevitably cause a reset and command retry after four seconds due a missing INIT ACK. Adding a preemptive BattOr reset at the end of a successful StopTracing command should shave one command retry (four seconds) off of each BattOr trace. BUG=711277

Patch Set 1 #

Total comments: 2

Patch Set 2 : Added comment and test cases, but still fighting with Mock #

Patch Set 3 : Fixed test cases #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -0 lines) Patch
M tools/battor_agent/battor_agent.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M tools/battor_agent/battor_agent.cc View 1 2 3 chunks +17 lines, -0 lines 0 comments Download
M tools/battor_agent/battor_agent_unittest.cc View 1 2 5 chunks +20 lines, -0 lines 1 comment Download

Messages

Total messages: 18 (4 generated)
nednguyen
I defer to Charlie & Randy
3 years, 7 months ago (2017-05-05 10:22:50 UTC) #5
charliea (OOO until 10-5)
Randy, would you mind prereviewing this and passing it onto me for final review? I'd ...
3 years, 7 months ago (2017-05-05 19:46:41 UTC) #6
rnephew (Reviews Here)
On 2017/05/05 19:46:41, charliea wrote: > Randy, would you mind prereviewing this and passing it ...
3 years, 7 months ago (2017-05-09 14:44:28 UTC) #7
charliea (OOO until 10-5)
I echo Randy's comment about unit tests https://codereview.chromium.org/2859353003/diff/1/tools/battor_agent/battor_agent.cc File tools/battor_agent/battor_agent.cc (right): https://codereview.chromium.org/2859353003/diff/1/tools/battor_agent/battor_agent.cc#newcode412 tools/battor_agent/battor_agent.cc:412: // Proactively ...
3 years, 7 months ago (2017-05-09 19:19:07 UTC) #8
rnephew (Reviews Here)
Not necessarily in this CL, but should we expose the Reset command in the battor_agent ...
3 years, 7 months ago (2017-05-10 22:00:36 UTC) #9
aschulman
On 2017/05/10 22:00:36, rnephew (Reviews Here) wrote: > Not necessarily in this CL, but should ...
3 years, 7 months ago (2017-05-12 05:58:44 UTC) #10
charliea (OOO until 10-5)
On 2017/05/12 05:58:44, aschulman wrote: > On 2017/05/10 22:00:36, rnephew (Reviews Here) wrote: > > ...
3 years, 7 months ago (2017-05-12 22:19:34 UTC) #11
aschulman
I just uploaded a new patch that addresses most issues. However I'm fighting with Mock ...
3 years, 7 months ago (2017-05-12 22:32:04 UTC) #12
charliea (OOO until 10-5)
I'm going to take a look at just the StopTracing test to try and make ...
3 years, 7 months ago (2017-05-15 18:15:13 UTC) #13
charliea (OOO until 10-5)
Okay, onto another failing test: Value of: IsCommandComplete() Actual: false Expected: true [ FAILED ] ...
3 years, 7 months ago (2017-05-15 18:54:09 UTC) #14
charliea (OOO until 10-5)
Hey Aaron, Just wanted to check in: are you waiting on anything to continue on ...
3 years, 7 months ago (2017-05-23 16:59:50 UTC) #15
aschulman
On 2017/05/23 16:59:50, charliea wrote: > Hey Aaron, > > Just wanted to check in: ...
3 years, 7 months ago (2017-05-23 19:38:38 UTC) #16
charliea (OOO until 10-5)
lgtm w/ comment Thanks for doing this Aaron! https://codereview.chromium.org/2859353003/diff/40001/tools/battor_agent/battor_agent_unittest.cc File tools/battor_agent/battor_agent_unittest.cc (right): https://codereview.chromium.org/2859353003/diff/40001/tools/battor_agent/battor_agent_unittest.cc#newcode783 tools/battor_agent/battor_agent_unittest.cc:783: OnBytesSent(true); ...
3 years, 7 months ago (2017-05-24 18:41:29 UTC) #17
aschulman
3 years, 6 months ago (2017-06-09 00:33:20 UTC) #18
On 2017/05/24 18:41:29, charliea wrote:
> lgtm w/ comment
> 
> Thanks for doing this Aaron!
> 
>
https://codereview.chromium.org/2859353003/diff/40001/tools/battor_agent/batt...
> File tools/battor_agent/battor_agent_unittest.cc (right):
> 
>
https://codereview.chromium.org/2859353003/diff/40001/tools/battor_agent/batt...
> tools/battor_agent/battor_agent_unittest.cc:783: OnBytesSent(true);
> I think there should be a test where everything goes to plan, but then the
send
> of the RESET message fails. (based on the current implementation, this should
> result in a send error, and we should just have a test making sure that
behavior
> is documented and working as intended)

actually taking a closer look a the unit tests, the StopTracing unit tests are
quite broken. for example, the StopTracing() megatest is just a repeat of all of
the stuff in RunStopTracingTo() and the StopTracingFailed tests are restarting
RunStopTracingTo from the beginning which means they are not running accurate
tests. I will fix this all up in another CL and add RESET in this CL.
in_reply_to: 5709068098338816
send_mail: 1
subject: [BattOr] Reduce StartTracing time by about four seconds.

Powered by Google App Engine
This is Rietveld 408576698