battor_agent usability changes |
||||||
Issue descriptionbattor_agent.exe is very useful for investigating Chrome's power usage. However it can be frustrating to use. Some possible improvements include: 1) Printing a help message when it can't find a BattOr 2) Printing a summary of power instead of all of the samples when StopTracing is invoked 3) Either make commands case insensitive or else warn that they are case sensitive (especially when unknown commands are received) 4) Emit ETW events when BattOr tracing starts and stops 5) Have a reduced-typing mode where hitting <Enter> toggles between StartTracing and StopTracing, with a summary of power printed out 6) Have a reduced-typing mode where tracing starts automatically and trace data is saved to a file that was specified on the command-line when <Enter> is typed again. Some of these changes would have to be enabled with a command-line switch. The goals are to make battor_agent more user friendly and also to make it easier to record repeated traces without requiring lots of typing while power data is being recorded.
,
Aug 3 2017
,
Aug 3 2017
I forgot to tag this bug on the first change in this series, so I'm copying the data over: The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/df2314bc8403a7ecab565bf990cf4ec54fc21127 commit df2314bc8403a7ecab565bf990cf4ec54fc21127 Author: Bruce Dawson <brucedawson@chromium.org> Date: Thu Aug 03 17:39:31 2017 Improve OOB experience for battor_agent When running battor_agent.exe for the first time one is likely to encounter the message "Unable to find a BattOr." Once a BattOr is found and battor_agent starts running there is a more informative help message printed if you type <enter>, but that is too late. This change prints an informative help message when a BattOr cannot be found, and also adds a bug link to the code to explain why BattOrs are not auto-found on Windows. BUG= 588244 Change-Id: I1206f906b32c2f2e6ec18517e6c184aaf44bb7a7 Reviewed-on: https://chromium-review.googlesource.com/598657 Reviewed-by: Charlie Andrews <charliea@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#491779} [modify] https://crrev.com/df2314bc8403a7ecab565bf990cf4ec54fc21127/tools/battor_agent/battor_agent_bin.cc [modify] https://crrev.com/df2314bc8403a7ecab565bf990cf4ec54fc21127/tools/battor_agent/battor_finder.cc
,
Aug 3 2017
Bruce. I like these ideas. We didn't really have any human CLI users of battor_agent until now, that's why the functionality is missing. As long as you preserve the functionality that we need in the perf infra (e.g., writing samples to files), I think these usability things would be great. Would the ETW trace events allow us to automatically sync ETW and BattOr in the trace-viewer data that is collected on the BattOr infra?
,
Aug 3 2017
The ETW trace events would let us easily manually line up BattOr data viewed in Chrome with ETW data viewed in WPA. However, this alignment would become unmanageable as we zoom into the data, so it has limited utility. https://codereview.appspot.com/326950043 is a partial proof of concept of how the integration could possibly be done properly. Would it be reasonable to have the default before for StopTracing with no parameters to be to print the average power draw in Watts, or should that be optional?
,
Aug 10 2017
,
Aug 11 2017
Bruce: there is this doc written long time ago about how we do clock syncing: https://bit.ly/tracing-clock-sync Maybe this could be interesting you, so I thought I gonna share :-)
,
Sep 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e3324e02024d47b835ef998d49d1d8f82debe4fb commit e3324e02024d47b835ef998d49d1d8f82debe4fb Author: Bruce Dawson <brucedawson@chromium.org> Date: Fri Sep 01 18:17:00 2017 Add interactive mode to battor_agent battor_agent is clumsy to use interactively because you have to type full commands. This adds an interactive mode (enabled with --interactive on the command line) where typing Enter toggles between StartTracing and StopTracing. Printing a tidy summary of the results will be added in a separate CL. BUG= 751863 Change-Id: I026821b438499d4826c9ccc07f3e3e0255d5da6a Reviewed-on: https://chromium-review.googlesource.com/638351 Reviewed-by: Charlie Andrews <charliea@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#499232} [modify] https://crrev.com/e3324e02024d47b835ef998d49d1d8f82debe4fb/tools/battor_agent/battor_agent_bin.cc
,
Sep 7 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6cca2c085e74f850f05746a13649d05a1b026ac5 commit 6cca2c085e74f850f05746a13649d05a1b026ac5 Author: Bruce Dawson <brucedawson@chromium.org> Date: Thu Sep 07 18:47:24 2017 Improve battor_agent interactive mode The battor_agent StopTracing command, if no file name is specified, printed the raw sampling data which can easily be 100,000 lines of numbers. This is not helpful. This change improves this case, especially when in interactive mode. Now a BattorResults object is returned which contains a detailed string representation of the results and enough information to allow creating a summary. When in battor_agent's interactive mode the summary is printed and the details are saved to a file (using a generated file name if none is supplied). The summary result format is for human consumption and is subject to change but currently it looks like this: StopTracing Second 0 average power: 9.20 W Second 1 average power: 8.65 W Second 2 average power: 11.38 W Average power over 3.14 s : 9.74 W Summary of power-by-seconds: Minimum: 8.65 Median: 9.20 Maximum: 11.38 Saving detailed results to c:\users\brucedawson\desktop\trace_data.txt Done. This lets the developer easily see the average power and the variability of power, which is helpful for getting a sense of how consistent the results are and therefore (in steady-state scenarios) how meaningful they are. This format has been tested for a few weeks on a Battor equipped SurfaceBook. Bug: 751863 Change-Id: I57af162f183a4d65388c88c901573cd6720ae2b8 Reviewed-on: https://chromium-review.googlesource.com/609385 Reviewed-by: Primiano Tucci <primiano@chromium.org> Reviewed-by: Charlie Andrews <charliea@chromium.org> Commit-Queue: Bruce Dawson <brucedawson@chromium.org> Cr-Commit-Position: refs/heads/master@{#500344} [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/content/browser/tracing/power_tracing_agent.cc [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/content/browser/tracing/power_tracing_agent.h [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_agent.cc [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_agent.h [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_agent_bin.cc [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_agent_unittest.cc [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_sample_converter.cc [modify] https://crrev.com/6cca2c085e74f850f05746a13649d05a1b026ac5/tools/battor_agent/battor_sample_converter.h
,
Jun 27 2018
Battor is being deprecated so no more work on this is needed. Some data was obtained from Battor, but I found that the local-testing results were too noisy to be very useful. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by brucedaw...@chromium.org
, Aug 3 2017