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

Benchmarking #1

Open
maximegmd opened this issue May 1, 2019 · 2 comments
Open

Benchmarking #1

maximegmd opened this issue May 1, 2019 · 2 comments

Comments

@maximegmd
Copy link
Member

It would be great if we had some benchmark code to see how expensive Buffers, Sockets, Connections and Filters are.

I was thinking of using https://github.com/iboB/picobench though I am not set, as long as it's header only and fairly simple to use.

@GrantMoyer
Copy link

I can work on this if no one is yet.

Would the following benchmarks suffice?

  • Buffer
    • Create
    • Clone
    • Destroy
    • Sequential write (bits and bytes)
    • Sequential read (bits and bytes)
    • Index (Random read)
    • Compare
  • Socket
    • Create
    • Bind
    • Destroy
    • Send
    • Receive
  • Connection
    • Create
    • Connect
    • Process Packet
    • Process Negotiation
    • ICommunication
      • Send
  • DHChachaFilter
    • Generate Keys
    • Encrypt
    • Decrypt

@maximegmd
Copy link
Member Author

I was more thinking about packet/second and data processed/second so that would mean a send/recv combo running for a few seconds to see what kind of bandwidth we can get per second. Then a DHChachaFilter connection handshake loop and after that a packet processing loop.

Regarding buffers it could be interesting to benchmark the cost vs std::vector for example as they perform pretty much the same basic operations.

I don't think socket create/bind/destroy should be benchmarked they pretty much only do the basic syscalls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants