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

Piezo PIFO trees: More thoughtful data gen #1787

Merged
merged 1 commit into from
Nov 24, 2023

Conversation

anshumanmohan
Copy link
Contributor

I have adjusted the synthetic data generation script a little, when run with the --piezo flag.

Before:
It used to just randomly generate 100 commands, which were pushes or pops. This meant that overflow and underflow were totally possible. Even if you made the queue resistant to over/underflows (so that the show just went on until all 100 commands were done) we could end the program with packets still left in the queue. This was bad because:

  • Failing by under/overflowing is actually quite cheap, so this compromised our "average cost per push" numbers, for example.
  • Pushing something and then never popping it also leaves some questions when trying to find average costs.

After:
Now we generate commands with a little more care, making sure that we never have underflows or overflows, and that we always pop out everything we push in. We still generate 100 commands total. This alleviates the issues above.

@anshumanmohan anshumanmohan merged commit 9f457bb into master Nov 24, 2023
@anshumanmohan anshumanmohan deleted the queue-data-gen-better branch November 24, 2023 03:12
@anshumanmohan anshumanmohan restored the queue-data-gen-better branch November 24, 2023 13:09
@anshumanmohan anshumanmohan deleted the queue-data-gen-better branch November 24, 2023 13:10
@anshumanmohan
Copy link
Contributor Author

Sorry that the tests appear to fail. They passed when I merged the branch, but my brief restoration of the branch has triggered a rerunning of the tests.

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.

1 participant