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

Misalign batch testcase peers and add scoring #1044

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

LukasPukenis
Copy link
Contributor

@LukasPukenis LukasPukenis commented Dec 20, 2024

Problem

Batching testcase was too ideal, just two peers and they interconnect immediately

Solution

  • Add 2 additional peers
  • Misalign all of their starting times and also their direct connection formation by blocking direct link for some time

This required to proceed with peer initialization manually instead of using the regular helpers

☑️ Definition of Done checklist

  • Commit history is clean (requirements)
  • README.md is updated
  • Functionality is covered by unit or integration tests

* Add 4 peers instead of 2 to batching testcase

* Misalign them by starting each with a delay. This
one is synthetic since in real world peers don't usually
start all at the same time and establish direct connections but
in testcase it's still worth to have.

* Misalign further by blocking alpha<->beta for a while
so they would establish direct connection later than
with other peers thus having a misalignment similar to real world.

* Add scoring to distribution histogram. It can now be
quantified how better/worse some solution or scenario is.
For now it's just added to be printed

Signed-off-by: Lukas Pukenis <[email protected]>
@LukasPukenis LukasPukenis force-pushed the LLT-5876_better_batching_testcase branch from 4335ef9 to 7b8f3a9 Compare December 20, 2024 11:34
@LukasPukenis LukasPukenis changed the title Misalign batch testcase and add score Misalign batch testcase peers and add scoring Dec 20, 2024
@LukasPukenis LukasPukenis marked this pull request as ready for review December 20, 2024 11:38
@LukasPukenis LukasPukenis requested a review from a team as a code owner December 20, 2024 11:38
BATCHING_MISALIGN_S = 7
BATCHING_CAPTURE_TIME = 120 # Tied to TEST_BATCHING_TIMEOUT
BATCHING_CAPTURE_TIME = 130
DOCKER_CONE_GW_2_IP = "10.0.254.2"
Copy link
Contributor

Choose a reason for hiding this comment

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

These IP is also defined in test_direct_connection.py. Maybe you can put them all in config.py or somewhere to avoid redefinitions.

Copy link
Contributor

@dfetti dfetti left a comment

Choose a reason for hiding this comment

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

+1.0

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