bencher.test_timing_report ========================== .. py:module:: bencher.test_timing_report .. autoapi-nested-parse:: Generate a BenchReport from pytest JUnit XML output. CLI: python bencher/test_timing_report.py [junit.xml] [output_dir] Attributes ---------- .. autoapisummary:: bencher.test_timing_report.junit_xml Functions --------- .. autoapisummary:: bencher.test_timing_report.parse_junit_xml bencher.test_timing_report.build_time_by_file_tab bencher.test_timing_report.build_slowest_tests_tab bencher.test_timing_report.build_summary_tab bencher.test_timing_report.generate_markdown_summary bencher.test_timing_report.generate_report Module Contents --------------- .. py:function:: parse_junit_xml(path: str | pathlib.Path) -> pandas.DataFrame Parse a JUnit XML file into a DataFrame of test cases. .. py:function:: build_time_by_file_tab(df: pandas.DataFrame) -> panel.pane.Plotly Horizontal bar chart of total time per test file. .. py:function:: build_slowest_tests_tab(df: pandas.DataFrame, top_n: int = 50) -> panel.widgets.Tabulator Table of the slowest individual tests. .. py:function:: build_summary_tab(df: pandas.DataFrame) -> panel.pane.Markdown Markdown summary of aggregate timing stats. .. py:function:: generate_markdown_summary(df: pandas.DataFrame, top_n: int = 10) -> str Generate a concise markdown summary suitable for a PR comment. .. py:function:: generate_report(junit_path: str | pathlib.Path, output_dir: str | pathlib.Path = 'reports') -> pathlib.Path Parse JUnit XML and generate an HTML timing report. .. py:data:: junit_xml