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

466 add delay in testing and planned migration #866

Merged
merged 50 commits into from
Aug 5, 2024

Conversation

khoanguyen-dev
Copy link
Member

@khoanguyen-dev khoanguyen-dev commented Dec 11, 2023

Changes and Information

Please briefly list the changes made, additional Information and what the Reviewer should look out for:

  • Add a time range to each type of test that determines the time it takes until the result is ready (TestParameter.require_time). Also add a time of validity to each test type (TestParameter.validity_period).
  • Save the test results of each individual test with the test time of the past (t- TestParameter.require_time).
  • Remove m_time_of_last_test in Person to use validity_period instead.

Merge Request - Guideline Checklist

Please check our git workflow. Use the draft feature if the Pull Request is not yet ready to review.

Checks by code author

  • Every addressed issue is linked (use the "Closes #ISSUE" keyword below)
  • New code adheres to coding guidelines
  • No large data files have been added (files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)
  • Tests are added for new functionality and a local test run was successful
  • Appropriate documentation for new functionality has been added (Doxygen in the code and Markdown files if necessary)
  • Proper attention to licenses, especially no new third-party software with conflicting license has been added
  • (For ABM development) Checked benchmark results

Checks by code reviewer(s)

  • Corresponding issue(s) is/are linked and addressed
  • Code is clean of development artifacts (no deactivated or commented code lines, no debugging printouts, etc.)
  • Appropriate unit tests have been added, CI passes and code coverage is acceptable (did not decrease)
  • No large data files added in the whole history of commits(files should in sum not exceed 100 KB, avoid PDFs, Word docs, etc.)

closes #466

@khoanguyen-dev khoanguyen-dev linked an issue Dec 11, 2023 that may be closed by this pull request
@xsaschako
Copy link
Member

Please remember to account for the benchmark, as testing is really computationally extensive :-D

Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.42%. Comparing base (8889b81) to head (c0f443e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #866      +/-   ##
==========================================
+ Coverage   96.14%   96.42%   +0.28%     
==========================================
  Files         131      132       +1     
  Lines       11049    11061      +12     
==========================================
+ Hits        10623    10666      +43     
+ Misses        426      395      -31     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@khoanguyen-dev
Copy link
Member Author

Basic functionality is implemented and is ready for review. However, the benchmark test is much slower than the main branch. Optimization is needed.

@khoanguyen-dev
Copy link
Member Author

Improved performance for the implementation with test results stored in the past.

Branch main:

Benchmark Time CPU Iterations

abm_benchmark/abm_benchmark_50k 2281 ms 2255 ms 1
abm_benchmark/abm_benchmark_100k 4908 ms 4619 ms 1
abm_benchmark/abm_benchmark_200k 9367 ms 9137 ms 1

Branch #866:

Benchmark Time CPU Iterations

abm_benchmark/abm_benchmark_50k 2391 ms 2367 ms 1
abm_benchmark/abm_benchmark_100k 4767 ms 4741 ms 1
abm_benchmark/abm_benchmark_200k 9543 ms 9484 ms 1

@khoanguyen-dev khoanguyen-dev requested a review from reneSchm July 29, 2024 19:00
Copy link
Member

@DavidKerkmann DavidKerkmann left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. I have a couple of suggestions for small improvements.
Is the benchmark up to date or has it improved with the new way of testing in the past?

cpp/models/abm/parameters.h Outdated Show resolved Hide resolved
cpp/models/abm/parameters.h Outdated Show resolved Hide resolved
cpp/models/abm/person.cpp Outdated Show resolved Hide resolved
cpp/models/abm/person.cpp Outdated Show resolved Hide resolved
cpp/models/abm/person.cpp Outdated Show resolved Hide resolved
cpp/models/abm/testing_strategy.cpp Show resolved Hide resolved
cpp/models/abm/testing_strategy.cpp Outdated Show resolved Hide resolved
cpp/models/abm/person.cpp Outdated Show resolved Hide resolved
cpp/models/abm/person.h Show resolved Hide resolved
cpp/tests/test_abm_person.cpp Outdated Show resolved Hide resolved
@DavidKerkmann
Copy link
Member

Apparently, there have been a lot of outdated comments that I made earlier. Please check if they are still valid and just resolve them if they are outdated.

Copy link
Member

@xsaschako xsaschako left a comment

Choose a reason for hiding this comment

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

From my side this looks good. I just did a high-level review.
Questions i had have already been questioned by david and were answered.

Copy link
Member

@DavidKerkmann DavidKerkmann left a comment

Choose a reason for hiding this comment

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

Thanks! There are only two minor things that I found now which could be slightly improved.

cpp/models/abm/test_type.h Outdated Show resolved Hide resolved
cpp/models/abm/person.h Show resolved Hide resolved
@DavidKerkmann DavidKerkmann merged commit cb5affd into main Aug 5, 2024
58 checks passed
@DavidKerkmann DavidKerkmann deleted the 466-add-delay-in-testing-and-planned-migration branch August 5, 2024 14:42
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.

Add delay in testing and planned migration
3 participants