Skip to content
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

eth/filters: fix failing benchmark-test #26144

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Nov 9, 2022

This PR fixes a benchmark-test which was made br0kken by this commit: https://github.com/ethereum/go-ethereum/pull/25641/files#diff-dcfcc1778e0f2ab8820d4b00af81d5ce5209067a3a9b40af012d9d07b641a8e1R59 .

Without this PR:

[user@work go-ethereum]$ go test -run - -bench BenchmarkFilters  ./eth/filters
INFO [11-09|08:44:00.421] Allocated cache and file handles         database=/tmp/BenchmarkFilters672625565/001 cache=16.00MiB handles=16
INFO [11-09|08:44:00.423] Persisted trie from memory database      nodes=1 size=142.00B time="5.708µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
--- FAIL: BenchmarkFilters
    filter_test.go:94: expected 4 logs, got 0
FAIL
exit status 1
FAIL    github.com/ethereum/go-ethereum/eth/filters     5.455s
FAIL

With this PR:

[user@work go-ethereum]$ go test -run - -bench BenchmarkFilters  ./eth/filters
INFO [11-09|08:46:50.012] Allocated cache and file handles         database=/tmp/BenchmarkFilters2692416678/001 cache=16.00MiB handles=16
INFO [11-09|08:46:50.013] Persisted trie from memory database      nodes=1 size=142.00B time="5.393µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
INFO [11-09|08:46:53.099] Persisted trie from memory database      nodes=1 size=142.00B time="116.421µs" gcnodes=0 gcsize=0.00B gctime=0s livenodes=1 livesize=0.00B
goos: linux
goarch: amd64
pkg: github.com/ethereum/go-ethereum/eth/filters
cpu: Intel(R) Core(TM) i9-10885H CPU @ 2.40GHz
BenchmarkFilters-8             1        1398357927 ns/op
PASS
ok      github.com/ethereum/go-ethereum/eth/filters     6.783s

@holiman holiman added this to the 1.11.0 milestone Nov 9, 2022
@holiman holiman merged commit 093b2ac into ethereum:master Nov 9, 2022
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
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.

2 participants