Skip to content

Support criterion benchmark group displays聽#20

Description

@EYHN

First of all I would like to thank you for making such a good benchmark action, which is almost the only well-functioning and well-maintained benchmark action on github. 馃檹 馃帀

I have a benchmark that uses criterion benchmark_group to compare multiple functions, for example I have the following benchmark code:

let mut group = c.benchmark_group("Map Insert");
group.bench_function("HashMap", |b| {
    ...
});
group.bench_function("BTreeMap", |b| {
    ...
});

When I run the benchmark locally, I can see in the console that the benchmark's name is a combination of the group's name and the function's name.

Map Insert/HashMap      time:   [275.12 ns 284.51 ns 293.79 ns]
Map Insert/BTreeMap     time:   [418.15 ns 424.73 ns 431.82 ns]

However, when running in codspeed, the result is only the function name, without the group name, which makes it difficult to compare.

鍥剧墖

Activity

changed the title [-]`criterion` benchmark group displays do not meet expectations[/-] [+]Support `criterion` benchmark group displays[/+] on Apr 24, 2024
changed the title [-]Support `criterion` benchmark group displays[/-] [+]Support `criterion` benchmark group displays[/+] on Sep 4, 2024

ctz commented on Oct 12, 2024

@ctz

Having just got started with codspeed (having learned about it at eurorust this week) I have the same experience.

eg, compare https://codspeed.io/ctz/graviola/benchmarks and https://jbp.io/graviola/reports/x86_64/report/index.html (from the same set of benchmark code)

added and removed on Mar 3, 2025

zeenix commented on Oct 11, 2025

@zeenix

At EuroRust 2025, I got convinced of this amazing tool by Codspeed developers so a bunch of us decided to try it out for our projects on the impl day (unconference). I'm happy to report that we were able to very quickly add codespeed to zbus's CI successfully and I'm quite happy with what I'm seeing so far. 馃殌

The only thing that was a but unimpressive was this issue and in case of zbus, some of the benchmark names become very non-descriptive because of this issue and even as the author of the benchmarks, I have difficulty remembering their context. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions