Skip to content

Commit 877d90a

Browse files
committed
bench: tweak benchmark names
It doesn't make sense to distinguish between a duration and a span in the "construct timestamp from seconds" benchmark, so just use a more generic name here.
1 parent 0315477 commit 877d90a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bench/src/timestamp.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ fn from_seconds(c: &mut Criterion) {
127127
const EXPECTED: Timestamp = Timestamp::constant(SECONDS, 0);
128128

129129
{
130-
benchmark(c, format!("{NAME}/span/jiff"), |b| {
130+
benchmark(c, format!("{NAME}/integer/jiff"), |b| {
131131
b.iter(|| {
132132
let got = Timestamp::from_second(bb(SECONDS)).unwrap();
133133
assert_eq!(got, EXPECTED);
@@ -137,7 +137,7 @@ fn from_seconds(c: &mut Criterion) {
137137

138138
{
139139
let expected = chrono::DateTime::convert_from(EXPECTED);
140-
benchmark(c, format!("{NAME}/duration/chrono"), |b| {
140+
benchmark(c, format!("{NAME}/integer/chrono"), |b| {
141141
b.iter(|| {
142142
let got =
143143
chrono::DateTime::from_timestamp(bb(SECONDS), 0).unwrap();
@@ -148,7 +148,7 @@ fn from_seconds(c: &mut Criterion) {
148148

149149
{
150150
let expected = time::UtcDateTime::convert_from(EXPECTED);
151-
benchmark(c, format!("{NAME}/duration/time"), |b| {
151+
benchmark(c, format!("{NAME}/integer/time"), |b| {
152152
b.iter(|| {
153153
let got = time::UtcDateTime::from_unix_timestamp(bb(SECONDS))
154154
.unwrap();

0 commit comments

Comments
 (0)