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

Issue 1732943002: tools/battor_agent: Changes the BattOr Agent binary to be interactive (Closed)

Created:
4 years, 10 months ago by charliea (OOO until 10-5)
Modified:
4 years, 10 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

tools/battor_agent: Changes the BattOr Agent binary to be interactive This is a follow-up to nednguyen@google.com 's proof-of-concept patch (http://crrev.com/1726353002) that demonstrated that communicating with the BattOr agent via standard input and output would be fast enough to perform accurate clock syncs. This is the interface that Telemetry and systrace will be using to communicating with the BattOr, so it's important that we make sure this works for them. My imagined usage is: 1) Telemetry is told to start a trace 2) Telemetry opens up a BattOr agent binary subprocess 3) Telemetry sends the subprocess the "StartTracing" message via STDIN 4) Telemetry waits for the subprocess to write a line to STDOUT ("Done." if successful, some error message otherwise) 5) If the last command was successful, Telemetry waits for the duration of the trace 6) When the tracing should end, Telemetry sends the subprocess the "RecordClockSyncMark <marker>" message. 7) Telemetry waits for the subprocess to write a line to STDOUT ("Done." if successful, some error message otherwise) 8) If the last command was successful, Telemetry sends the subprocess the "StopTracing" message via STDIN 9) Telemetry continues to read trace output lines from STDOUT until the binary exits with an exit code of 1 (indicating failure) or the "Done." line is printed to STDOUT, signaling the last line of the trace. Does this protocol sound reasonable? BUG=542837 Committed: https://crrev.com/879caf4d9679a07b6dae42ec6cc09a719b5046c5 Cr-Commit-Position: refs/heads/master@{#378004}

Patch Set 1 #

Total comments: 4

Patch Set 2 : Documented usage #

Unified diffs Side-by-side diffs Delta from patch set Stats (+68 lines, -62 lines) Patch
M tools/battor_agent/battor_agent_bin.cc View 1 6 chunks +68 lines, -62 lines 0 comments Download

Messages

Total messages: 17 (8 generated)
charliea (OOO until 10-5)
4 years, 10 months ago (2016-02-24 19:28:24 UTC) #5
nednguyen
On 2016/02/24 19:28:24, charliea wrote: The protocol makes sense to me. Though I think we ...
4 years, 10 months ago (2016-02-24 20:17:21 UTC) #6
alexandermont
The protocol sounds reasonable to me. https://codereview.chromium.org/1732943002/diff/1/tools/battor_agent/battor_agent_bin.cc File tools/battor_agent/battor_agent_bin.cc (right): https://codereview.chromium.org/1732943002/diff/1/tools/battor_agent/battor_agent_bin.cc#newcode89 tools/battor_agent/battor_agent_bin.cc:89: std::string path = ...
4 years, 10 months ago (2016-02-24 22:01:48 UTC) #7
Zhen Wang
lgtm I think the "Telemetry" in the protocol should be more specific, i.e., PowerTracingAgent in ...
4 years, 10 months ago (2016-02-24 22:35:45 UTC) #8
alexandermont
lgtm
4 years, 10 months ago (2016-02-25 23:37:22 UTC) #9
charliea (OOO until 10-5)
On 2016/02/24 20:17:21, nednguyen wrote: > On 2016/02/24 19:28:24, charliea wrote: > > The protocol ...
4 years, 10 months ago (2016-02-26 21:33:20 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1732943002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1732943002/20001
4 years, 10 months ago (2016-02-26 21:38:24 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 10 months ago (2016-02-26 22:24:51 UTC) #15
commit-bot: I haz the power
4 years, 10 months ago (2016-02-26 22:26:24 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/879caf4d9679a07b6dae42ec6cc09a719b5046c5
Cr-Commit-Position: refs/heads/master@{#378004}

Powered by Google App Engine
This is Rietveld 408576698