@@ -183,6 +183,7 @@ def format_difference(compare: Iterable[Result], base: Iterable[Result]) -> str:
183183 else :
184184 return s
185185
186+
186187def report_larger_than_original (results_dir : str , python_versions : str , minifier_sha : str ) -> str :
187188 yield '''
188189## Larger than original
@@ -201,6 +202,7 @@ def report_larger_than_original(results_dir: str, python_versions: str, minifier
201202 for entry in larger_than_original :
202203 yield f'| { entry .corpus_entry } | { entry .original_size } | { entry .minified_size } ({ entry .minified_size - entry .original_size :+} ) |'
203204
205+
204206def report_unstable (results_dir : str , python_versions : str , minifier_sha : str ) -> str :
205207 yield '''
206208## Unstable
@@ -219,6 +221,7 @@ def report_unstable(results_dir: str, python_versions: str, minifier_sha: str) -
219221 for entry in unstable :
220222 yield f'| { entry .corpus_entry } | { python_version } | { entry .original_size } |'
221223
224+
222225def report_exceptions (results_dir : str , python_versions : str , minifier_sha : str ) -> str :
223226 yield '''
224227## Exceptions
@@ -243,6 +246,7 @@ def report_exceptions(results_dir: str, python_versions: str, minifier_sha: str)
243246 if not exceptions_found :
244247 yield ' None | | |'
245248
249+
246250def report_larger_than_base (results_dir : str , python_versions : str , minifier_sha : str , base_sha : str ) -> str :
247251 yield '''
248252## Top 10 Larger than base
@@ -272,6 +276,7 @@ def report_larger_than_base(results_dir: str, python_versions: str, minifier_sha
272276 if not there_are_some_larger_than_base :
273277 yield '| N/A | N/A | N/A |'
274278
279+
275280def report_slowest (results_dir : str , python_versions : str , minifier_sha : str ) -> str :
276281 yield '''
277282## Top 10 Slowest
@@ -288,6 +293,7 @@ def report_slowest(results_dir: str, python_versions: str, minifier_sha: str) ->
288293 for entry in sorted (summary .entries .values (), key = lambda entry : entry .time , reverse = True )[:10 ]:
289294 yield f'| { entry .corpus_entry } | { entry .original_size } | { entry .minified_size } | { entry .time :.3f} |'
290295
296+
291297def report (results_dir : str , minifier_ref : str , minifier_sha : str , base_ref : str , base_sha : str ) -> Iterable [str ]:
292298 """
293299 Generate a report comparing the results of two versions of python-minifier
0 commit comments