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

Increase test coverage #45

Open
fredericof opened this issue Nov 17, 2022 · 5 comments
Open

Increase test coverage #45

fredericof opened this issue Nov 17, 2022 · 5 comments
Assignees
Labels

Comments

@fredericof
Copy link
Collaborator

fredericof commented Nov 17, 2022

More unit tests for core components:

  • Broker
  • Events
  • Publish/Subscriber
  • Handshake
  • Node
  • Peer
  • Router
  • Session
  • Signal
  • Errors

Tests to check:

  • Peer metrics (What should the metrics be for a peer?)
  • Node benchmark
  • Benchmark with data transfer
  • Security channel: Encrypted and Decrypted
  • Check if a public key already exists
  • Sign data with the public key
  • Connection errors

Some use cases:

  • Transfer data
  • Bidirectional communication
  • Broadcast message
  • Inspect a peer routing table

Good Practices:

@fredericof fredericof added this to the Use Cases milestone Nov 17, 2022
@geolffreym
Copy link
Owner

geolffreym commented Nov 18, 2022

"Peer metrics (What should the metrics be for a peer?)"

  • handshakeTime // how long took the handshake to complete.
  • latency // rtt in ms
  • bandwidth // remote peer bandwidth
  • sent // sent messages
  • recv // received messages
  • bytesRecv // bytes received
  • bytesSent // bytes sent

@geolffreym
Copy link
Owner

geolffreym commented Nov 18, 2022

"Security channel: Encrypted and Decrypted"

  • Here we could measure the difference between using blake2 and sha2 as a hashing function, maybe we could also calculate the time it takes to generate the keys and prepare to start the handshake?
  • How log it takes key generation?
  • How log it takes encryption/decryption?

@geolffreym
Copy link
Owner

geolffreym commented Dec 8, 2022

"Node benchmark"

  • how long it takes to initialize the node and prepare it to listen.
  • how long it takes to connect with another peer before the handshake.
  • how long does it take to finish the hanshake between one node and another simulating the latency using this site https://www.meter.net/tools/world-ping-test/ to obtain a list of latencies based on a specific location so that we can simulate the time it might take to handshake a node based on this latency.

@geolffreym
Copy link
Owner

"Benchmark with data transfer"

@geolffreym
Copy link
Owner

  • benchmark memory usage for handshake byte pool profiling
  • benchmark time for message exchange

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

No branches or pull requests

2 participants