8000 test(mempool): Add two `Update` benchmarks by hvanz · Pull Request #3873 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

test(mempool): Add two Update benchmarks #3873

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 28, 2024
Merged

Conversation

hvanz
Copy link
Member
@hvanz hvanz commented Aug 27, 2024

Add new BenchmarkUpdate and BenchmarkUpdateAndRecheck.
Also fix BenchmarkCheckDuplicateTx.


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments

@hvanz hvanz added mempool backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x backport-to-v1.x Tell Mergify to backport the PR to v1.x testing related to unit testing in general labels Aug 27, 2024
@hvanz hvanz self-assigned this Aug 27, 2024
@hvanz
Copy link
Member Author
hvanz commented Aug 27, 2024

Results on 6088660d5:

BenchmarkReap-8                              134           8706054 ns/op          485834 B/op      10002 allocs/op
BenchmarkCheckTx-8                         50638             24562 ns/op            1131 B/op         22 allocs/op
BenchmarkParallelCheckTx-8                 44566             26688 ns/op            1276 B/op         26 allocs/op
BenchmarkCheckDuplicateTx-8               203733              7081 ns/op               0 B/op          0 allocs/op
BenchmarkUpdate-8                         129362              9796 ns/op             160 B/op          3 allocs/op
BenchmarkUpdateAndRecheck-8                  603           2198752 ns/op          136352 B/op       2507 allocs/op
BenchmarkUpdateRemoteClient-8              22159             70248 ns/op            1000 B/op         31 allocs/op

@hvanz hvanz changed the title test(mempool): Add two Update benchmark tests test(mempool): Add two Update benchmarks Aug 27, 2024
@hvanz hvanz marked this pull request as ready for review August 27, 2024 09:14
@hvanz hvanz requested review from a team as code owners August 27, 2024 09:14
@@ -91,12 +91,6 @@ func (txs Txs) hashList() [][]byte {
// Txs is a slice of transactions. Sorting a Txs value orders the transactions
// lexicographically.

func (txs Txs) Len() int { return len(txs) }
Copy link
Contributor

Choose a reason for hiding this comment

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

Go API break => we can't backport to v0.38.x

Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need this field only for this benchmark? If so, can we extract it somehow differently to not break APIs jsut for the sake of testing. If we are using it somewhere else in the mempool lanes work then this function should go together in a PR with where it is useful in production, not here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Or we can just leave it there for v0.38.x

Copy link
Member Author

Choose a reason for hiding this comment

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

We can also mark these functions as deprecated (even in v0.38.x).

Copy link
Contributor

Choose a reason for hiding this comment

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

Then we can leave them in 0.38.x, mark them as deprecated in v1.x and remove them later on.

@hvanz hvanz removed the backport-to-v0.38.x Tell Mergify to backport the PR to v0.38.x label Aug 28, 2024
@hvanz hvanz added this pull request to the merge queue Aug 28, 2024
Merged via the queue into main with commit 27a4606 Aug 28, 2024
37 checks passed
@hvanz hvanz deleted the hvanz/mempool-update-benchmarks branch August 28, 2024 14:53
mergify bot pushed a commit that referenced this pull request Aug 28, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 27a4606)

# Conflicts:
#	mempool/clist_mempool_test.go
#	mempool/reactor_test.go
@hvanz
Copy link
Member Author
hvanz commented Aug 29, 2024

@Mergifyio backport v0.38.x

Copy link
Contributor
mergify bot commented Aug 29, 2024

backport v0.38.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 29, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 27a4606)

# Conflicts:
#	mempool/bench_test.go
#	mempool/clist_mempool_test.go
#	mempool/reactor_test.go
#	types/tx.go
hvanz added a commit that referenced this pull request Sep 2, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Sep 2, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request #3873 done by
[Mergify](https://mergify.com).

Co-authored-by: Hernán Vanzetto <15466498+hvanz@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this pull request Sep 2, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request #3873 done by
[Mergify](https://mergify.com).

Co-authored-by: Hernán Vanzetto <15466498+hvanz@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit 1013c80)
mergify bot added a commit that referenced this pull request Sep 2, 2024
Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request #3873 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Hernán Vanzetto <15466498+hvanz@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: hvanz <hernan.vanzetto@gmail.com>
hvanz pushed a commit that referenced this pull request Sep 2, 2024
…3892) (#3957)

Add new `BenchmarkUpdate` and `BenchmarkUpdateAndRecheck`.
Also fix `BenchmarkCheckDuplicateTx`.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
<hr>This is an automatic backport of pull request #3873 done by
[Mergify](https://mergify.com).<hr>This is an automatic backport of pull
request #3892 done by [Mergify](https://mergify.com).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-to-v1.x Tell Mergify to backport the PR to v1.x mempool testing related to unit testing in general
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants
0