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

Add Gossip simulator module #269

Merged
merged 36 commits into from
Feb 24, 2023
Merged

Conversation

Nashatyrev
Copy link
Collaborator

@Nashatyrev Nashatyrev commented Feb 21, 2023

Add Gossip simulator module.

  • Extract libp2p.testFixtures schedulers package to a dedicated :tools:schedulers module
  • Add :tools:simulator module
  • Simulation main classes are located in the package io.libp2p.simulate.main
  • Any simulation could be run from the gradle command line (gradle application plugin applied in the module)
  • Simulations are configured programmatically only
  • Add simulator README and the reference from the main README

Copy link
Contributor

@zilm13 zilm13 left a comment

Choose a reason for hiding this comment

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

LGTM

Do I understand correctly, that schedulers were not referenced from anywhere inside module before?

> gradle :tools:simulator:run -PmainClass=<your.main.Class> [--args="you args"]
```

For example to run the sample simulation use the command below:
Copy link
Contributor

Choose a reason for hiding this comment

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

Simple simulation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sample simple simulation :)

@Nashatyrev
Copy link
Collaborator Author

Do I understand correctly, that schedulers were not referenced from anywhere inside module before?

Schedulers were used by tests and JMH benchmark. Now also used by the simulator

@zilm13
Copy link
Contributor

zilm13 commented Feb 21, 2023

Do I understand correctly, that schedulers were not referenced from anywhere inside module before?

Schedulers were used by tests and JMH benchmark. Now also used by the simulator

Ah.. I've finally found test using it. It's not broken, I see

@Nashatyrev
Copy link
Collaborator Author

I've added a number of changes: reactoring and cleaning up the simulator code only.
@zilm13 please let me know if I'm still good to go with these changes

@Nashatyrev Nashatyrev merged commit 70f712b into libp2p:develop Feb 24, 2023
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