Project Reports REST API


List reports for a project


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

List all reports for a project. If the project is public, then the user does not need to be authenticated. If the project is private, then the user must be authenticated and have `view` permissions for the project. By default, the reports are sorted by date time in reverse chronological order. The HTTP response header `X-Total-Count` contains the total number of reports.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.

Query Parameters


direction

string

The direction to sort by. If not specified, the default sort direction is used.

Default: asc

One of: asc, desc


page

integer

The page number to return. If not specified, the first page is returned.

Default: 1


per_page

integer

The number of items to return per page. If not specified, the default number of items per page (8) is used.

Default: 8


sort

string

The field to sort by. If not specified, the default sort field is used.

Default: date_time

One of: date_time


branch

string

Filter by branch UUID, slug, or name exact match.


end_time

integer

Filter for reports before the given date time in milliseconds.


start_time

integer

Filter for reports after the given date time in milliseconds.


testbed

string

Filter by testbed UUID, slug, or name exact match.

GET
/v0/projects/{project}/reports
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher report list PROJECT

View OpenAPI Spec

Create a report


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

Create a report for a project. The user must have `create` permissions for the project. If using the Bencher CLI, it is recommended to use the `bencher run` subcommand instead of trying to create a report manually.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.

Body Parameters


branch

string

Required

Branch UUID, slug, or name. If the branch does not exist, it will be created.


end_time

string

Required

End time for the report. Must be an ISO 8601 formatted string.


hash

string

Full `git` commit hash. All reports with the same `git` commit hash will be considered part of the same branch version. This can be useful for tracking the performance of a specific commit across multiple testbeds.


results

array of strings

Required

An array of benchmarks results.


settings

object

Settings for how to handle the report.

Properties of settings

adapter

string

The benchmark harness adapter for parsing the benchmark results. If no adapter is specified, then the Magic adapter will be used.

Default: magic

One of: magic, json, rust, rust_bench, rust_criterion, rust_iai, rust_iai_callgrind, cpp, cpp_google, cpp_catch2, go, go_bench, java, java_jmh, c_sharp, c_sharp_dot_net, js, js_benchmark, js_time, python, python_asv, python_pytest, ruby, ruby_benchmark, shell, shell_hyperfine


average

string

Benchmark harness suggested central tendency (ie average). Some benchmarking harnesses provide multiple averages, such as mean and median.

One of: mean, median


fold

string

Fold multiple results into a single result using the selected operation. This can be useful for taking the min, max, mean, or median of the benchmark results.

One of: min, max, mean, median


start_point

object

The start point for the report branch. If the branch already exists and the start point is not provided, the current branch will be used. If the branch already exists and the start point provided is different, a new branch will be created from the new start point. If the branch does not exist, the start point will be used to create a new branch. If a new branch is created with a start point, all branch versions from the start point branch will be shallow copied over to the new branch. That is, all historical metrics data for the start point branch will appear in queries for the branch. For example, pull request branches often use their base branch as their start point branch. If a new branch is created, it is not kept in sync with the start point branch.

Properties of start_point

branch

string

The UUID, slug, or name of the branch to use as the start point.


hash

string

The full git hash of the branch to use as the start point. Requires the `branch` field to be set.


reset

boolean

Reset the branch to an empty state. If the branch already exists, a new empty branch will be created. Will not take effect if the `branch` field is set.


thresholds

boolean

If set to `true`, the thresholds from the start point branch will be deep copied to the new branch. This can be useful for pull request branches that should have the same thresholds as their target branch. Requires the `branch` field to be set.


start_time

string

Required

Start time for the report. Must be an ISO 8601 formatted string.


testbed

string

Required

Testbed UUID, slug, or name. If the testbed does not exist, it will be created.

POST
/v0/projects/{project}/reports
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher report create PROJECT

View OpenAPI Spec

View a report


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

View a report for a project. If the project is public, then the user does not need to be authenticated. If the project is private, then the user must be authenticated and have `view` permissions for the project.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.


report

string

Required

The UUID for a report.

GET
/v0/projects/{project}/reports/{report}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher report view PROJECT REPORT

View OpenAPI Spec

Delete a report


⚠️ Breaking Changes: The Bencher API is in beta and under active development. We may introduce breaking changes in future releases. We will announce any breaking changes in the release notes.

Delete a report for a project. The user must have `delete` permissions for the project. If there are no more reports for a branch version, then that version will be deleted. All later branch versions will have their version numbers decremented.

Headers


Content-Type

string

Required

Set to application/json.


Authorization

string

Required

Set to Bearer BENCHER_API_TOKEN, where BENCHER_API_TOKEN is a vaild Bencher API token.

Path Parameters


project

string

Required

The slug or UUID for a project.


report

string

Required

The UUID for a report.

DELETE
/v0/projects/{project}/reports/{report}
Bencher Cloud https://api.bencher.dev
Bencher Self-Hosted http://localhost:61016

Bencher CLI

bencher report delete PROJECT REPORT

View OpenAPI Spec


Published: Mon, February 12, 2024 at 7:26:00 AM UTC | Last Updated: Fri, June 21, 2024 at 5:47:00 PM UTC