diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/analyze-archive.py | 12 | ||||
-rwxr-xr-x | bin/analyze-kconfig.py | 19 |
2 files changed, 6 insertions, 25 deletions
diff --git a/bin/analyze-archive.py b/bin/analyze-archive.py index 88b6802..fef8005 100755 --- a/bin/analyze-archive.py +++ b/bin/analyze-archive.py @@ -365,11 +365,6 @@ if __name__ == "__main__": ) dfatool.cli.add_standard_arguments(parser) parser.add_argument( - "--info", - action="store_true", - help="Show state duration and (for each state and transition) number of measurements and parameter values)", - ) - parser.add_argument( "--no-cache", action="store_true", help="Do not load cached measurement results" ) parser.add_argument( @@ -459,13 +454,6 @@ if __name__ == "__main__": "Note that this may remove entire function calls from the model.", ) parser.add_argument( - "--log-level", - metavar="LEVEL", - choices=["debug", "info", "warning", "error"], - default="warning", - help="Set log level", - ) - parser.add_argument( "--with-safe-functions", action="store_true", help="Include 'safe' functions (safe_log, safe_inv, safe_sqrt) which are also defined for 0 and -1. " diff --git a/bin/analyze-kconfig.py b/bin/analyze-kconfig.py index b9f071f..a2deaf7 100755 --- a/bin/analyze-kconfig.py +++ b/bin/analyze-kconfig.py @@ -73,15 +73,6 @@ def main(): metavar="FILE", ) parser.add_argument( - "--log-level", - default=logging.INFO, - type=lambda level: getattr(logging, level.upper()), - help="Set log level", - ) - parser.add_argument( - "--info", action="store_true", help="Show Kconfig and benchmark information" - ) - parser.add_argument( "--sample-size", type=int, help="Restrict model generation to N random samples", @@ -118,10 +109,12 @@ def main(): args = parser.parse_args() - if isinstance(args.log_level, int): - logging.basicConfig(level=args.log_level) - else: - print(f"Invalid log level. Setting log level to INFO.", file=sys.stderr) + if args.log_level: + numeric_level = getattr(logging, args.log_level.upper(), None) + if not isinstance(numeric_level, int): + print(f"Invalid log level: {args.log_level}", file=sys.stderr) + sys.exit(1) + logging.basicConfig(level=numeric_level) if args.export_dref: dref = dict() |