bencher.test_timing_report

Generate a BenchReport from pytest JUnit XML output.

CLI: python bencher/test_timing_report.py [junit.xml] [output_dir]

Attributes

junit_xml

Functions

parse_junit_xml(→ pandas.DataFrame)

Parse a JUnit XML file into a DataFrame of test cases.

build_time_by_file_tab(→ panel.pane.Plotly)

Horizontal bar chart of total time per test file.

build_slowest_tests_tab(→ panel.widgets.Tabulator)

Table of the slowest individual tests.

build_summary_tab(→ panel.pane.Markdown)

Markdown summary of aggregate timing stats.

generate_markdown_summary(→ str)

Generate a concise markdown summary suitable for a PR comment.

generate_report(→ pathlib.Path)

Parse JUnit XML and generate an HTML timing report.

Module Contents

bencher.test_timing_report.parse_junit_xml(path: str | pathlib.Path) pandas.DataFrame

Parse a JUnit XML file into a DataFrame of test cases.

bencher.test_timing_report.build_time_by_file_tab(df: pandas.DataFrame) panel.pane.Plotly

Horizontal bar chart of total time per test file.

bencher.test_timing_report.build_slowest_tests_tab(df: pandas.DataFrame, top_n: int = 50) panel.widgets.Tabulator

Table of the slowest individual tests.

bencher.test_timing_report.build_summary_tab(df: pandas.DataFrame) panel.pane.Markdown

Markdown summary of aggregate timing stats.

bencher.test_timing_report.generate_markdown_summary(df: pandas.DataFrame, top_n: int = 10) str

Generate a concise markdown summary suitable for a PR comment.

bencher.test_timing_report.generate_report(junit_path: str | pathlib.Path, output_dir: str | pathlib.Path = 'reports') pathlib.Path

Parse JUnit XML and generate an HTML timing report.

bencher.test_timing_report.junit_xml