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

tools: option to run block generator test multiple times #5617

Merged
merged 2 commits into from Jul 28, 2023

Conversation

winder
Copy link
Contributor

@winder winder commented Jul 28, 2023

Summary

Optimizing for usage patterns. It is sometimes useful to run the same suite multiple times to account for transient DB behavior.

I'm using several scripts to run this tool. There may be other features from those scripts that should be migrated, but this seemed like a good start.

There are also some minor changes to logging to remove constant debug output and optimize for general usage.

Test Plan

  1. Start a postgres container.
  2. Run the command:
./block-generator runner \
    --conduit-binary /home/will/algorand/conduit/cmd/conduit/conduit \
    --report-directory reports \
    --test-duration 5s \
    --conduit-log-level trace \
    --postgres-connection-string "host=localhost user=algorand password=algorand dbname=generator_db port=15432 sslmode=disable" \
    --scenario generator/test_scenario.yml \
    --reset-db --times 5 --reset-report-dir

@winder winder requested review from tzaffi and shiqizng July 28, 2023 13:37
@winder winder marked this pull request as ready for review July 28, 2023 13:37
@codecov
Copy link

codecov bot commented Jul 28, 2023

Codecov Report

Merging #5617 (f043a74) into master (d82691d) will increase coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #5617      +/-   ##
==========================================
+ Coverage   54.95%   54.97%   +0.02%     
==========================================
  Files         460      460              
  Lines       64446    64446              
==========================================
+ Hits        35417    35432      +15     
+ Misses      26653    26644       -9     
+ Partials     2376     2370       -6     

see 13 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

shiqizng
shiqizng previously approved these changes Jul 28, 2023
Copy link
Contributor

@tzaffi tzaffi left a comment

Choose a reason for hiding this comment

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

Nice change!

Now that the generator has a verbose flag, suggesting to use it for quieting some printouts, instead of commenting them out.

tools/block-generator/generator/generate.go Outdated Show resolved Hide resolved
tools/block-generator/generator/generate.go Outdated Show resolved Hide resolved
Co-authored-by: Zeph Grunschlag <tzaffi@users.noreply.github.com>
@winder winder changed the title generator: option to run test multiple times. tools: option to run test multiple times. Jul 28, 2023
@winder winder requested a review from shiqizng July 28, 2023 17:54
@winder winder self-assigned this Jul 28, 2023
@algorandskiy algorandskiy merged commit 0903cbf into algorand:master Jul 28, 2023
20 of 21 checks passed
@algorandskiy algorandskiy changed the title tools: option to run test multiple times. tools: option to run block generator test multiple times Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants