From 69262fc087ca62255a6a78e61657460416e75f79 Mon Sep 17 00:00:00 2001 From: Yanray Wang Date: Mon, 24 Jul 2023 16:36:40 +0800 Subject: [PATCH] code_size_compare: add extra indication if print to sys.stdout If we output comparison result into sys.stdout, it will print an extra line to show information we used for code size comparison in detail. This would be helpful if we copy & paste code size changes in Github comment. Signed-off-by: Yanray Wang --- scripts/code_size_compare.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/code_size_compare.py b/scripts/code_size_compare.py index a8c8c9641e..b886a9e990 100755 --- a/scripts/code_size_compare.py +++ b/scripts/code_size_compare.py @@ -768,6 +768,10 @@ class CodeSizeComparison: self.new_size_dist_info.git_rev)) if self.result_options.stdout: output = sys.stdout + print("Measure code size between `{}` and `{}` by `{}`." + .format(self.old_size_dist_info.get_info_indication(), + self.new_size_dist_info.get_info_indication(), + self.size_common_info.get_info_indication())) else: output_file = os.path.join( self.comp_dir,