summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2023-12-07 16:02:40 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2023-12-07 16:02:40 +0100
commit66093484e26ae54b07c89b9a350eb21b87a6fac3 (patch)
treed9a54167c8e24d7d8e679c5b7e7e0ec4fa41f7ec
parent9dd743b474ced8494e070f5193dac7378ddc6449 (diff)
analyze-archive: add --boxplot-unparam support
-rwxr-xr-xbin/analyze-archive.py32
1 files changed, 32 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 1d623b1..8ce9a23 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -645,6 +645,38 @@ if __name__ == "__main__":
output=fname,
)
+ if args.boxplot_unparam:
+ plotter.boxplot(
+ model.names,
+ [model.by_name[name]["power"] for name in model.names],
+ xlabel="State/Transition",
+ ylabel="Average Power [µW]",
+ output=f"{args.boxplot_unparam}power.pdf",
+ )
+ plotter.boxplot(
+ model.transitions,
+ [model.by_name[name]["duration"] for name in model.transitions],
+ xlabel="Transition",
+ ylabel="Duration [µs]",
+ output=f"{args.boxplot_unparam}duration.pdf",
+ )
+ for name in model.names:
+ plotter.boxplot(
+ [name],
+ [model.by_name[name]["power"]],
+ xlabel="State/Transition",
+ ylabel="Average Power [µW]",
+ output=f"{args.boxplot_unparam}{name}-power.pdf",
+ )
+ for trans in model.transitions:
+ plotter.boxplot(
+ [trans],
+ [model.by_name[trans]["duration"]],
+ xlabel="Transition",
+ ylabel="duration [µs]",
+ output=f"{args.boxplot_unparam}{trans}-duration.pdf",
+ )
+
if len(show_models):
print("--- simple static model ---")
static_model = model.get_static()