summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2024-01-12 15:28:17 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2024-01-12 15:28:17 +0100
commit94865648210a69544b049acf54991eba35d92c18 (patch)
treeb343d1e88b1eedf66f0fe1fdfa54360114aaddbf /bin
parent5d6f965c656466b99457fd3fea80183f2e81fa43 (diff)
add --filter-observations
Diffstat (limited to 'bin')
-rwxr-xr-xbin/analyze-archive.py6
-rwxr-xr-xbin/analyze-kconfig.py6
-rwxr-xr-xbin/analyze-log.py6
3 files changed, 18 insertions, 0 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py
index 9414d1a..4641477 100755
--- a/bin/analyze-archive.py
+++ b/bin/analyze-archive.py
@@ -285,6 +285,11 @@ if __name__ == "__main__":
else:
args.filter_param = list()
+ if args.filter_observation:
+ args.filter_observation = list(
+ map(lambda x: tuple(x.split(":")), args.filter_observation.split(","))
+ )
+
if args.with_safe_functions is not None:
safe_functions_enabled = True
@@ -379,6 +384,7 @@ if __name__ == "__main__":
dfatool.utils.ignore_param(by_name, parameters, args.ignore_param)
dfatool.utils.filter_aggregate_by_param(by_name, parameters, args.filter_param)
+ dfatool.utils.filter_aggregate_by_observation(by_name, args.filter_observation)
if args.param_shift:
param_shift = dfatool.cli.parse_param_shift(args.param_shift)
diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py
index bdfde8f..e17e383 100755
--- a/bin/analyze-kconfig.py
+++ b/bin/analyze-kconfig.py
@@ -305,6 +305,12 @@ def main():
by_name, parameter_names, args.filter_param
)
+ if args.filter_observation:
+ args.filter_observation = list(
+ map(lambda x: tuple(x.split(":")), args.filter_observation.split(","))
+ )
+ dfatool.utils.filter_aggregate_by_observation(by_name, args.filter_observation)
+
if args.max_std:
max_std = dict()
if "=" in args.max_std:
diff --git a/bin/analyze-log.py b/bin/analyze-log.py
index 65f3b44..e3ddef8 100755
--- a/bin/analyze-log.py
+++ b/bin/analyze-log.py
@@ -62,6 +62,11 @@ def main():
else:
args.filter_param = list()
+ if args.filter_observation:
+ args.filter_observation = list(
+ map(lambda x: tuple(x.split(":")), args.filter_observation.split(","))
+ )
+
observations = reduce(lambda a, b: a + b, map(parse_logfile, args.logfiles))
by_name, parameter_names = dfatool.utils.observations_to_by_name(observations)
del observations
@@ -71,6 +76,7 @@ def main():
dfatool.utils.ignore_param(by_name, parameter_names, args.ignore_param)
dfatool.utils.filter_aggregate_by_param(by_name, parameter_names, args.filter_param)
+ dfatool.utils.filter_aggregate_by_observation(by_name, args.filter_observation)
if args.param_shift:
param_shift = dfatool.cli.parse_param_shift(args.param_shift)