| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Right now we have several different versions of #! in
our python scripts. Unify them all and specify that we
are using python2.
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
BUG=none
BRANCH=none
TEST=make buildall
Change-Id: Iab33a3f5d4b827451a55542bcee8837b00da7867
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1817948
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
pyusb 1.0.2 changed two API calls upon which we depend:
b3ee6cdfef8f find function returns an iterator.
dac78933f6a6 Removed unnecessary length argument to util.get_string
This CL only updates callers of these APIs (the previous CL contained some
unrelated changes around kernel driver detach and closing stm32usb).
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Based-on: https://chromium-review.googlesource.com/1125354
BRANCH=None
BUG=chromium:958677
TEST=precq passes
TEST=chromiumos-sdk tryjob buildbucketId=8915374561970847360
TEST=using servo v2
servod -b grunt
=> no python exceptions when starting servod
TEST=using servo v4
servod -b grunt
=> no python exceptions when starting servod
TEST=using u-Servo:
servod -b grunt
=> no python exceptions when starting servod
for i in {1..10000} ; do echo $i $(dut-control ec_uart_en spi1_buf_en ); done
=> No stability regression versus pyusb-1.0.0b1
TEST=servo_updater, EC console via servo
Cq-Depend: chromium:1597548,chromium:1597156,chromium:1597157
Change-Id: Ic8101707838e5d19e901cf1f7125b97b5102f089
Reviewed-on: https://chromium-review.googlesource.com/1597156
Commit-Ready: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Daniel Kurtz <djkurtz@chromium.org>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=master
BUG=b:112865585,b:123259683
TEST=No log spam when import as module from autotest
Change-Id: I7ced102bbb893bc1baa88c625b8c7279a1e32677
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1437515
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changing powerlog.README.md(orginally board.README) format to md.
Adding details, making clarifications.
BRANCH=None
BUG=b:111318462
TEST=None
Change-Id: Ic617d3da9518708560501be2786031dbd432ffe4
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1171503
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL only changes the file name. Next CL changes the file
content. Separating into 2 CLs for easier diff.
BRANCH=None
BUG=b:111318462
TEST=None
Change-Id: I8f8044e97b718270eb477dc29ba7e9e2c419db8c
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1171599
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now for the formatted output string, if any value a domain is NaN,
the domains gets tagged with a * and a help text gets added at the end
of the summary to highlight this issue.
CQ-DEPEND=CL:1140025
BRANCH=None
BUG=chromium:806146, chromium:760267
TEST=unit tests added & pass
Change-Id: I30791053bb1645065fa2bfd8305cc840a4a88031
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140032
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces a flag to StatsManager that allows for 'NaN' values
to be recorded inside StatsManager. The motivation here is that if a
sample fails to record it might be more desirable to record a 'NaN'
than to just skip the sample, to keep timelines correct, and to not hide
errors in the test-run.
Also adds necessary tests for that behavior.
BRANCH=None
BUG=chromium:806146, chromium:760267
TEST=unit tests still pass
Change-Id: If17b7f52ba4a05e9e007c73bfa5d667fe36b74b3
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140031
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a title is supplied it now gets printed centralized on top of the
summary when calling SummaryToString.
BRANCH=None
BUG=chromium:760267
TEST=unit tests are passing
Change-Id: I7c59896ebac82d2ee7b632fd18350b9b4fff2c24
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140030
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the case of multiple StatsManager, we might get data clobbered.
That's particularly bad on long-running tests.
This CL introduces two methods to make sure output files are unique in a
directory.
(1) on init, the user can supply a StatsManagerID (smid) that will be
prepended to all output files.
E.g. if the smid is 'ec' the summary will be stored at ec_summary.txt
(2) should that fail because multiple StatsManagers are using the same
smid supplied (or none were supplied) a simple file rotation is done
where an integer suffix keeps getting incremented until the filename is
unique.
E.g. if summary.txt already exists, then summary1.txt will be created.
This is not threadsafe at all so the user still have to use some caution
to avoid clobbering their own data.
BRANCH=None
BUG=chromium:760267
TEST=unit tests still all pass
Change-Id: I6cc083259362ee20e0242b94ac7cbb1228a06a7a
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140029
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some test code currently duplicates knowledge by telling StatsManager
where to save a file and then having to figure out where it stored the
files again. This CL has StatsManager return the save locations to
simplfy code. This potentially allows for informative logging on where
information was stored.
BRANCH=None
BUG=chromium:760267
TEST=unit tests still pass
Change-Id: I54b5873a4a3ddade9a73da0792c1947445759ad4
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140028
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StatsManager right now uses a '__' prefix to indicate that
sample_msecs should be the first key in the summary.
Additionally, there is a NOSHOW_PREFIX to potentially hide rails in the
summary.
This CL replaces that approach with constructor arguments to feed into
the StatsManager what rails to hide, and the order to print a summary.
This results in cleaner code, and less information leakage across classes
as hiding & sorting becomes an implementation detail.
It also adds two new unit tests to StatsManagerTest to verify this
behavior works as intended.
As a nit this CL also replaces AddValue with AddSample as Sample is more
descriptive for the use-cases.
BRANCH=None
BUG=chromium:760267
TEST=manual testing, same output as before, and unittests still pass
Change-Id: I52ca0d85c4600691fce8d4c74fd2a81fc4aa440f
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140027
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
StatsManager is a library shared across some modules. It shouldn't print
anything itself, but rather use logging & return a formatted summary
that can be printed.
Also take this opportunity to replace majority of explicit print calls
in powerlog with logger module.
BRANCH=None
BUG=chromium:760267
TEST=manual testing, output as expected still for powerlog
Change-Id: I0ed2ccaa45bbd1261119a1446110beadb075c1a2
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140026
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the first CL in a series of CLs to start using StatsManager in
servo/hdctools (package depends on ec-devutils, as in this package).
This CL:
- beefs up StatsManager to handle unavailable units more gracefully
- adds a few more tests to stats_manager_unittest.py
- adds some minor unit testing for powerlog's file retrieval logic
BRANCH=None
BUG=chromium:760267
TEST=manual testing, unit tests still pass, powerlog still works
Change-Id: Ifcdfcc482008484fbc21326c6f087ebf466c3e74
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1140025
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 7d26ae49bffcf269df82df7d0fee00e8c3341166.
pyusb 1.0.2 fails under load and locks up the usb endpoint.
BUG=b:111658037, chromium:865482
TEST=while RES=$(dut-control ec_uart_en spi1_buf_en ); do echo ${RES}; done
CQ-DEPEND=CL:1149509
Original change's description:
> ec-devutils: update pyusb to 1.0.2
>
> Pyusb interface has changed yet again. Patch calls to get_string
> and usb.core.find. Modify ordering of detetch kernel driver
> and avoid rereferencing endpoints.
>
> BRANCH=None
> BUG=b:110907544
> TEST=emerge ec-devutils, run powerlog, usb_console, servo_updater
>
> CQ-DEPEND=CL:1119632
>
> Signed-off-by: Nick Sanders <nsanders@chromium.org>
>
> Change-Id: I33df474ce3bb57d2e11c9f384ac013b51d210843
> Reviewed-on: https://chromium-review.googlesource.com/1125354
> Commit-Ready: Nick Sanders <nsanders@chromium.org>
> Tested-by: Nick Sanders <nsanders@chromium.org>
> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Bug: b:110907544
Change-Id: I04f015b4924e7fee76ab0f1734267e8e2d14faaa
Reviewed-on: https://chromium-review.googlesource.com/1150963
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Pyusb interface has changed yet again. Patch calls to get_string
and usb.core.find. Modify ordering of detetch kernel driver
and avoid rereferencing endpoints.
BRANCH=None
BUG=b:110907544
TEST=emerge ec-devutils, run powerlog, usb_console, servo_updater
CQ-DEPEND=CL:1119632
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: I33df474ce3bb57d2e11c9f384ac013b51d210843
Reviewed-on: https://chromium-review.googlesource.com/1125354
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kevin/Gru are running out of space and we already have another ARM board on
ToT for development. Remove maintenance burden of keeping them around.
BRANCH=none
BUG=chromium:851512
TEST=build_packages --board=kevin works with dependent CLs.
CQ-DEPEND=CL:1102565,CL:*640973,CL:*640974
Change-Id: Ie7c65c7799acc9f4d266e40b29b37240fec345c6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1100011
Reviewed-by: Ilja H. Friedel <ihf@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Script to convert .board file (input to powerlog.py) into .py file which
can be used to generate .xml configuration file for servod.
BUG=none
BRANCH=none
TEST= convert a .board file to .py file and verify it works.
Change-Id: Ia67d1552c048895efee10d7a92830cfa25a51984
Signed-off-by: Ravi Chandra Sadineni <ravisadineni@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1105479
Reviewed-by: Puthikorn Voravootivat <puthik@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow board & addr in the board file instead of channel, to make board
file creation and configuration simpler.
This is part of the efforts in the BUG to make sweetberry under chrome
os simpler to use. In that case, we allow now (with crrev.com/c/1051215) to
generate .board files using explicit pin and bank numbers (j2,j3,j4).
BRANCH=None
BUG=chromium:806148
TEST=manual test, works fine.
Change-Id: I6fd3bb1a4a5ffffee08b81625ecb190adceeb2e7
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1051212
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, sweetberry ocassionally throws Exception when
resetting the USB interface. This CL mitigates that by
- Use linearly back off algorithm with 10ms delay increment
before next reset attempt to avoid flooding the sweetberry
hardware with reset requests.
- Increase retry amount from 10 to 100
BUG=chromium:834252
TEST=No "Exception: ('Power', 'Failed to reset')" seen
Change-Id: Iaf039cb82760205d1747fd630387852b7cfd8f83
Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1038788
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL updates stats_manager to match the new functionalities
in powerlog.py and refactors powerlog.py to more easily find
config files and print timestamps in seconds since epoch.
The unit test for stats_manager is also updated accordingly.
BUG=b:72973433
BRANCH=None
TEST=powerlog -b nami_rev0_loc.board -c nami_rev0_loc.scenario \
--print_stats --save_stats /tmp --save_stats_json /tmp \
--save_raw_data /tmp --mW
and looking at the printed data
python -m unittest stats_manager_unittest
CQ-DEPEND=CL:1003522
Change-Id: Ic6e4aadfcd3ad245572788094ee3d3a30106044c
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1002546
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a config to specify whether sweetberry
should measure power, current, voltage per powerlog entry.
The json format is slightly revised to allow data type
per channel. powerlog and sweetberry fw are updated
to handle the new functionality.
BUG=b:72973433
BRANCH=None
TEST=./powerlog.py -b marlin.board -c marlin_a.scenario -s .5
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: I231fc6600495146fad30583872bf14c660d5a50b
Reviewed-on: https://chromium-review.googlesource.com/905427
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Mengqi Guo <mqg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds microsecond to sweetberry timestamp, for more
accuracy in timing sweetberry runs.
This CL is part of the effort to start sweetberry measurements
while running power autotests.
BRANCH=None
BUG=b:68956240
TEST=./powerlog.py -b xxx.board -c xxx.scenario \
--save_stats_json [directory to store it]
Change-Id: I68c40d5be6d684205b49428c4e5cb6e69af6dfdf
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/812502
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds the flag --save_stats_json which prints the MEAN
of sweetberry readings into json format. Corresponding unit
test has been added too. Printing just the MEAN in json format
makes it easier to read it back in power_telemetry_logger,
which uploads the stats to the dashboard.
This CL is part of the effort to start sweetberry measurements
while running power autotests.
BRANCH=None
BUG=b:68956240
TEST=./powerlog.py -b xxx.board -c xxx.scenario \
--save_stats_json [directory to store it]
python -m unittest -v stats_manager_unittest
Change-Id: I8274bcac21175f6c53184ced79b6ffe5e7d7a72a
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/807636
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL modifies the 2 flags --save_stats and --save_raw_data
so that they can take arguments to save the corresponding file
into directories that we specify. It also provides a new flag
--no_print_raw_data to suppress printing sweetberry readings in
real time.
This CL is part of the effort to start sweetberry measurements
while running power autotests.
BRANCH=None
BUG=b:68956240
TEST=./powerlog.py -b xxx.board -c xxx.scenario \
--save_stats ./xxx --save_raw_data ./xxx --no_print_raw_data
Change-Id: I01ebeafc5f4eebd0a77746e9968367f267e93d83
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/756255
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding a flag to print power numbers in milliwatts instead of
microwatts, to be the same as servo ina board. This will make it
easier for power team to keep track of power numbers in the
future.
BRANCH=None
BUG=b:35578707
TEST=./powerlog.py -b xxx.board -c xxx.scenario --mW
python -m unittest -v stats_manager_unittest
Change-Id: I397da26561324227682404e62ee025384e7624eb
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/688743
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL provides the tool to calculate statistics for sweetberry
readings and present them in a clear & easy to read format. It
also provides the flag to store raw data and statistics
summary, should the need arise.
There are also some code cleanup for powerlog.py.
BRANCH=None
BUG=b:35578707
TEST=./powerlog.py -b xxx.board -c xxx.scenario --print_stats \
--save_stats --save_raw_data
python -m unittest -v stats_manager_unittest
Change-Id: I4aa732756fe6512f37acfcb59b11d950101887d7
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/667241
Reviewed-by: Nick Sanders <nsanders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
convert_servo_ina.py can convert power log config
files from hdctools/servo/data into sweetberry configs
BRANCH=None
BUG=b:35578707
TEST=compare kevin_r0_loc.py output with kevin.board
Change-Id: Iadc57fe4eb1f5b220c6bffe3a3fe8a10b0d6b5a2
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/634486
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
powerlog.py can now take -A serialA -B serialB to collect data
from both left and right sweetberries simultaneously.
Also, the Spower class has been modified to allow API usage
rather than console only usage.
BRANCH=None
BUG=chromium:608039
TEST=log from both sweetberries on marlin
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Change-Id: Iaeaddad223f35f0e5cad1549b85fa3f7e4d5e1c7
Reviewed-on: https://chromium-review.googlesource.com/422496
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
powerlog.py can access sweetberry and log power data.
Also included are marlin and kevin example board configs.
BUG=chromium:608039
TEST=log power data
BRANCH=None
Change-Id: I0f868d95d17d86522dca045a227a824563f93cd0
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/413293
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|