Skip to content

Conversation

@gefjon
Copy link
Contributor

@gefjon gefjon commented Sep 29, 2023

Description of Changes

Based on my limited understanding of Criterion, I think we can get add transactions per second reporting to benchmarks using Criterion's Throughput::Elements tracking, by treating transactions as elements.

This is not ideal, as the output says e.g. thrpt: [38.763 Kelem/s 38.781 Kelem/s 38.799 Kelem/s], where we'd like Ktx/s, but it's not clear whether Criterion allows us that much customization.

Each of the benchmarks currently does one tx per iteration, so pass Throughput::Elements(1) for each of them. Do this as close to the test as possible, despite redundancy, in case we ever add benchmarks to the same group which do multiple transactions per iteration.

API and ABI

  • This is a breaking change to the module ABI
  • This is a breaking change to the module API
  • This is a breaking change to the ClientAPI
  • This is a breaking change to the SDK API

If the API is breaking, please state below what will break

Based on my limited understanding of Criterion,
I think we can get add transactions per second reporting to benchmarks
using Criterion's Throughput::Elements tracking,
by treating transactions as elements.

This is not ideal, as the output says e.g.
`thrpt:  [38.763 Kelem/s 38.781 Kelem/s 38.799 Kelem/s]`,
where we'd like `Ktx/s`,
but it's not clear whether Criterion allows us that much customization.

Each of the benchmarks currently does one tx per iteration,
so pass `Throughput::Elements(1)` for each of them.
Do this as close to the test as possible, despite redundancy,
in case we ever add benchmarks to the same group
which do multiple transactions per iteration.
@gefjon gefjon requested a review from kazimuth September 29, 2023 23:22
@cloutiertyler
Copy link
Contributor

benchmarks please

Copy link
Contributor

@cloutiertyler cloutiertyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloutiertyler cloutiertyler merged commit 97ed85e into master Sep 30, 2023
bfops pushed a commit that referenced this pull request Jul 17, 2025
The doc text suggested DB_NAME for variable name, but code sample used DBNAME.

Changed all to DB_NAME, for consistency.

Thanks @gefjon on Issue #345.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants