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, p2p/simulations: fix benchmarks #23806

Merged
merged 4 commits into from
Oct 29, 2021

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Oct 25, 2021

Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present.

Another one was rejected because the receipt was lacking a backing transcation.

The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.

go test ./p2p/simulations --run - -bench . --benchmem
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=346330a23288a0d9 err="node not started"
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=81cd0ab7412886ff err="node not started"
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=6491608c57436c4d err="node not started"

The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.

 go test ./p2p/simulations --run - -bench . --benchmem
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=346330a23288a0d9 err="node not started"
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=81cd0ab7412886ff err="node not started"
WARN [10-25|13:21:01.293|p2p/simulations/network.go:701] Can't close node                         id=6491608c57436c4d err="node not started"
@holiman
Copy link
Contributor Author

holiman commented Oct 28, 2021

ping @fjl, LGTY?

Copy link
Member

@MariusVanDerWijden MariusVanDerWijden left a comment

Choose a reason for hiding this comment

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

LGTM

@holiman holiman added this to the 1.10.12 milestone Oct 29, 2021
@holiman holiman merged commit 31870a5 into ethereum:master Oct 29, 2021
sidhujag pushed a commit to syscoin/go-ethereum that referenced this pull request Oct 29, 2021
Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present.

Another one was rejected because the receipt was lacking a backing transcation.

The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.
@holiman holiman deleted the benchfix_3 branch November 10, 2021 18:32
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this pull request Dec 3, 2022
Some benchmarks in eth/filters were not good: they weren't reproducible, relying on geth chaindata to be present.

Another one was rejected because the receipt was lacking a backing transcation.

The p2p simulation benchmark had a lot of the warnings below, due to the framework calling both
Stop() and Close(). Apparently, the simulated adapter is the only implementation which has a Close(),
and there is no need to call both Stop and Close on it.
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.

4 participants