Expand description

Generate markdown comparison tables from Cargo Criterion benchmark JSON output.

Currently, the tool is limited to Github Flavored Markdown (GFM), but adding new output types is relatively simple.

Generated Markdown Example

Benchmark Report

Modules

This module holds the various formatters that can be used to format the output

Structs

Raw deserialized JSON Criterion benchmark data

Raw deserialized JSON Criterion benchmark group data

Column maximum width data

A comparison time of a benchmark to its baseline

Fully processed Criterion benchmark data ready for formatting

Configuration file format for adding comments to tables

Enums

Enum that can hold either Raw deserialized JSON benchmark or benchmark group data

Time unit of a particular measurement

Traits

Implement this “visitor” trait to create a Formatter for a new file type

Functions

Top level function that can be used to build table data. It takes a reader (raw cargo-criterion JSON data), a Formatter (only option is GFMFormatter as of this writing), and the name of a file in TablesConfig toml format (the file is optional, simply skipped if it can’t be found)