Skip to content

Conversation

vasild
Copy link
Contributor

@vasild vasild commented Apr 24, 2020

The added benchmarks exercise the public methods Add(), GetAddr(),
Select() and Good().

The added benchmarks exercise the public methods Add(), GetAddr(),
Select() and Good().
@vasild
Copy link
Contributor Author

vasild commented Apr 24, 2020

Extracted from #18722 upon request.

Copy link
Member

@maflcko maflcko left a comment

Choose a reason for hiding this comment

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

ACK a9b9577

return;
}

FastRandomContext rng(uint256(std::vector<unsigned char>(32, 123)));
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think you can just set

Suggested change
FastRandomContext rng(uint256(std::vector<unsigned char>(32, 123)));
FastRandomContext rng(/* deterministic */ true);

or is there a reason for the seed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, /* deterministic */ true would have been better. I will have this in mind and also change this code if I am touching it again.

There is no need for the chosen seed - it only has to be the same every time to reduce noise in performance tests.

Thanks!

@maflcko
Copy link
Member

maflcko commented Apr 24, 2020

cc @naumenkogs (you might be interested in this)

@naumenkogs
Copy link
Member

utACK a9b9577

@maflcko maflcko merged commit 6f51f6f into bitcoin:master Apr 25, 2020
sidhujag pushed a commit to syscoin/syscoin that referenced this pull request Apr 25, 2020
a9b9577 bench: add CAddrMan benchmarks (Vasil Dimov)

Pull request description:

  The added benchmarks exercise the public methods Add(), GetAddr(),
  Select() and Good().

ACKs for top commit:
  naumenkogs:
    utACK a9b9577
  MarcoFalke:
    ACK a9b9577

Tree-SHA512: af54b2fbd97db34faf4cc6c9bacb20d2c97d0aaddb9cf91b220bc2e09227b55345402ed17e34450745493e3a2b286c176c031cdeb477415570a757cee16b06a8
@vasild vasild deleted the addrman_perf_test branch April 27, 2020 09:38
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jan 21, 2021
Summary:
a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks (Vasil Dimov)

Pull request description:

  The added benchmarks exercise the public methods Add(), GetAddr(),
  Select() and Good().

---

Backport of Core [[bitcoin/bitcoin#18754 | PR18754]]

Test Plan:
  ninja all
  ./src/bench/bitcoin-bench -filter=AddrMan.*

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8992
ftrader pushed a commit to bitcoin-cash-node/bitcoin-cash-node that referenced this pull request Apr 14, 2021
Summary:
a9b957740e3490d87e5ce0b7f1b93ba43bb19764 bench: add CAddrMan benchmarks (Vasil Dimov)

Pull request description:

  The added benchmarks exercise the public methods Add(), GetAddr(),
  Select() and Good().

---

Backport of Core [[bitcoin/bitcoin#18754 | PR18754]]

Test Plan:
  ninja all
  ./src/bench/bitcoin-bench -filter=AddrMan.*

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8992
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants