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

perf: reduced delays and syncs in functional tests to run faster #6278

Merged
merged 7 commits into from
Sep 25, 2024

Conversation

knst
Copy link
Collaborator

@knst knst commented Sep 18, 2024

Issue being fixed or feature implemented

Functional tests take too long time to run.

(PR is recreated from #6268 because CI is broken)

What was done?

  • increased robustness feature_llmq_simplepose.py by adding missing bump for mocktime during block generations
  • removed sleep(1) from each stage of mine_quorum
  • removed sleep(6) from final stage of mine_cycled_quorum
  • size of batch for block generation in feature_asset_locks.py and in activate_fork_by_name() increased from 10 blocks to 50 blocks
  • moved governance's functional tests to "60 seconds+" category because they always the last one to wait if running more than 10 jobs at once
    Plus extra refactoring which removes dead and commented code from test_framework.py

How Has This Been Tested?

Locally, the functional tests speed up with these fixes for 15% for overall time and 20% for accumulated time
test/functional/test_runner.py -j20

Before:

ALL                                                | ✓ Passed  | 7860 s (accumulated)  
Runtime: 481 s

After:

ALL                                                | ✓ Passed | 6237 s (accumulated) 
Runtime: 416 s

CI tsan job speeds up for 5 minutes in absolute time (~5%) and 1000 seconds in accumulated time.

ALL                                                | ✓ Passed  | 23854 s (accumulated) 
Runtime: 6249 s

old version vs new version

ALL                                                | ✓ Passed  | 22901 s (accumulated) 
Runtime: 5962 s

Breaking Changes

N/A

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation
  • I have assigned this pull request to a milestone

@knst knst force-pushed the functional-tests-delays-p2 branch 2 times, most recently from e966324 to b9961c4 Compare September 19, 2024 08:34
UdjinM6
UdjinM6 previously approved these changes Sep 19, 2024
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

ACK b9961c4

@knst
Copy link
Collaborator Author

knst commented Sep 19, 2024

@PastaPastaPasta see my comment here:

#6268 (comment)

Re-create PR due to CI stuck on previous PR and unavailable "re-open" button

@PastaPastaPasta
Copy link
Member

Soooo do I no longer need to test / compare multiple commits here?

@knst
Copy link
Collaborator Author

knst commented Sep 20, 2024

Soooo do I no longer need to test / compare multiple commits here?

If you can test, may you, at least b9961c4 (with udjin's patch)?

@UdjinM6 UdjinM6 added this to the 21.2 milestone Sep 22, 2024
Copy link

This pull request has conflicts, please rebase.

@knst
Copy link
Collaborator Author

knst commented Sep 23, 2024

@knst knst force-pushed the functional-tests-delays-p2 branch from b9961c4 to 874ef8c

rebased due to conflict with #6261

@knst knst requested a review from UdjinM6 September 23, 2024 18:25
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

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

utACK 874ef8c

Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

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

utACK 874ef8c

@PastaPastaPasta PastaPastaPasta merged commit 61201b8 into dashpay:develop Sep 25, 2024
34 of 35 checks passed
@knst knst deleted the functional-tests-delays-p2 branch September 26, 2024 07:24
knst added a commit that referenced this pull request Sep 26, 2024
…e.py`

a656d2f feat: more logging (UdjinM6)
cedd3d5 refactor: make expected_connections optional (UdjinM6)
fd2fbe0 fix: check mn state after each mined quorum (UdjinM6)
cce87a6 fix: should have at least 2 connections when testing isolate_mn (UdjinM6)
793f4b7 fix: connect repaired mns only (UdjinM6)
8597acd fix: remember mns that don't listen and avoid them (UdjinM6)
2069625 fix: calculate expected_complaints correctly (UdjinM6)

Pull request description:

  ## Issue being fixed or feature implemented
  Fix some general mistakes and also `connect_nodes` related issues discovered while debugging #6276. Add some logging to make debugging a bit easier.

  ~NOTE: builds on top of #6278 to avoid conflicts, will rebase~ done

  ## What was done?
  pls see individual commits

  ## How Has This Been Tested?
  run tests

  ## Breaking Changes
  n/a

  ## Checklist:
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [ ] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  kwvg:
    LGTM, ACK a656d2f
  knst:
    ACK a656d2f
  PastaPastaPasta:
    utACK a656d2f

Tree-SHA512: 30f657218ce0338f9a5a09d9a839cca9c4605740265d2182a1e143ec6ece739fecf748f7b60ccec065c17d9f6d893c0c47893be05c44bb8d34624fb4bf3c2a58
@UdjinM6 UdjinM6 modified the milestones: 21.2, 22 Oct 29, 2024
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.

3 participants