simplebench.reporters.protocols.report_renderer module🔗

“Protocols for reporters stuff.

class simplebench.reporters.protocols.report_renderer.ReportRenderer(*args, **kwargs)[source]🔗

Bases: Protocol

A protocol for render methods in Reporters.

Defines a method signature for rendering benchmark results for a given Case and Section.

The signature must match the following:

def method_name(self, *, case: Case, section: Section, options: ReporterOptions) -> str | bytes | Text | Table:

Subsets of str | bytes | Text | Table for the return type are allowed for specific reporters.