|
93 | 93 | "specified values are averaged WITHOUT weighing by the --repetitions parameter of llama-bench." |
94 | 94 | ) |
95 | 95 | parser.add_argument("-s", "--show", help=help_s) |
| 96 | +parser.add_argument("--verbose", action="store_true", help="increase output verbosity") |
96 | 97 |
|
97 | 98 | known_args, unknown_args = parser.parse_known_args() |
98 | 99 |
|
| 100 | +logging.basicConfig(level=logging.DEBUG if known_args.verbose else logging.INFO) |
| 101 | + |
99 | 102 | if unknown_args: |
100 | | - logger.error(f"Received unknown args: {unknown_args}.") |
| 103 | + logger.error(f"Received unknown args: {unknown_args}.\n") |
101 | 104 | parser.print_help() |
102 | 105 | sys.exit(1) |
103 | 106 |
|
|
110 | 113 | input_file = sqlite_files[0] |
111 | 114 |
|
112 | 115 | if input_file is None: |
113 | | - logger.error("Cannot find a suitable input file, please provide one.") |
| 116 | + logger.error("Cannot find a suitable input file, please provide one.\n") |
114 | 117 | parser.print_help() |
115 | 118 | sys.exit(1) |
116 | 119 |
|
@@ -202,12 +205,12 @@ def get_commit_hexsha8(name): |
202 | 205 | hexsha8_baseline = find_parent_in_data(repo.heads.master.commit) |
203 | 206 |
|
204 | 207 | if hexsha8_baseline is None: |
205 | | - logger.error("No baseline was provided and did not find data for any master branch commits.") |
| 208 | + logger.error("No baseline was provided and did not find data for any master branch commits.\n") |
206 | 209 | parser.print_help() |
207 | 210 | sys.exit(1) |
208 | 211 | else: |
209 | 212 | logger.error("No baseline was provided and the current working directory " |
210 | | - "is not part of a git repository from which a baseline could be inferred.") |
| 213 | + "is not part of a git repository from which a baseline could be inferred.\n") |
211 | 214 | parser.print_help() |
212 | 215 | sys.exit(1) |
213 | 216 |
|
@@ -238,7 +241,7 @@ def get_commit_hexsha8(name): |
238 | 241 | break |
239 | 242 |
|
240 | 243 | if hexsha8_compare is None: |
241 | | - logger.error("No compare target was provided and did not find data for any non-master commits.") |
| 244 | + logger.error("No compare target was provided and did not find data for any non-master commits.\n") |
242 | 245 | parser.print_help() |
243 | 246 | sys.exit(1) |
244 | 247 | else: |
@@ -361,7 +364,7 @@ def get_rows(properties): |
361 | 364 | headers = [PRETTY_NAMES[p] for p in show] |
362 | 365 | headers += ["Test", f"t/s {name_baseline}", f"t/s {name_compare}", "Speedup"] |
363 | 366 |
|
364 | | -logger.info(tabulate( |
| 367 | +print(tabulate( # noqa: NP100 |
365 | 368 | table, |
366 | 369 | headers=headers, |
367 | 370 | floatfmt=".2f", |
|
0 commit comments