From 004b6bbac7b774c8bad84dc7ca9e2877d1cf2f08 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Mon, 7 Nov 2022 13:27:49 +0200 Subject: [PATCH] Add timing --- scripts/strip-useless-debug.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/strip-useless-debug.py b/scripts/strip-useless-debug.py index 65c7de0e88..530835c2d0 100755 --- a/scripts/strip-useless-debug.py +++ b/scripts/strip-useless-debug.py @@ -54,6 +54,7 @@ import argparse import asyncio import os +import time import shutil import subprocess import tempfile @@ -156,11 +157,14 @@ async def main(): while len(paths) > 0: path = paths.pop() + start_time = time.perf_counter_ns() (before_size, after_size) = await run_objcopy(path) + end_time = time.perf_counter_ns() before_total += before_size after_total += after_size - print(f"{path}: {before_size} to {after_size} bytes") + duration_ms = round((end_time-start_time) / 1000000) + print(f"{path}: {before_size} to {after_size} bytes ({duration_ms} ms)") active_workers = [] for i in range(max_parallel_processes):