diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-15 11:53:46 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-01-15 11:53:46 +0100 |
commit | 1977a4a0b0c2c76b534c7966aff3be62d811195b (patch) | |
tree | c6371cfe5224b6b277e86d5110885e0160aa5862 | |
parent | 93e518db1c3b5536fc1b37a739101aaaf3e95e2b (diff) |
--stat: show changepoint / interval attributes
-rwxr-xr-x | bin/msp430-etv | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bin/msp430-etv b/bin/msp430-etv index 61447b7..5ad506d 100755 --- a/bin/msp430-etv +++ b/bin/msp430-etv @@ -553,6 +553,18 @@ def main(): ) ) + if args.stat and args.pelt is not None: + for i, cp in enumerate(power_changepoints): + interval = cp["interval"] + mean = cp["mean"] + duration = interval[1] - interval[0] + print( + f"Changepoint {i:2d}: {interval[0]:7.3f} -> {interval[1]:7.3f} ({duration:6.3f} s, {mean * 1e6:5.0f} µW)" + ) + if len(power_changepoints): + interval = (power_changepoints[-1]["interval"][1], data[-1, 0] * 1e-6) + print(f"Tail : {interval[0]:7.3f} -> {interval[1]:7.3f}") + if args.json_export: extra_data = dict() if args.pelt: |