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

Test duration values ​​are now presented in seconds with six digits of precision. Tests without time measurements have been edited. #4435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KaganCanSit
Copy link
Contributor

Pull Request: Systematically Time All Test Suites (#4417) - Test duration values ​​are now presented in seconds with six digits of precision. Tests without time measurements have been edited.

Summary

  • Enhanced Time Precision:
    Adjusted the printing of time values to display with 6 digits of precision in seconds. This improvement ensures more accurate and consistent timing information across all tests.

  • Added Time Measurement
    Implemented timing calls for tests that previously did not measure execution time. This update affected several files to achieve full coverage of time measurements across all test
    While considering where to set these timing calls, I explored alternatives like placing the time measurement in the Result object's constructor and destructor. However, given that the Result objects are stored in a vector and altering the existing structure might have unforeseen side effects, I opted to integrate the timing calls in a way that preserves the current architecture.

  • Additional Considerations
    During testing, I observed that time values are not always printed due to the if (m_ns_taken > 0) condition in the std::string Test::Result::result_string() function located in "test.cpp." After careful consideration, I decided to retain this condition, as it appears to function as expected and aligns with the intended logic.

Best regards

Note: I am aware that this change affects a lot of files and their content. However, I have tried to make the impact minimal while remaining true to the existing architecture. If you have any content that you would like to see edited, I would be happy to help you out as much as I can.

@KaganCanSit KaganCanSit changed the title #4417 - Test duration values ​​are now presented in seconds with six digits of precision. Tests without time measurements have been edited. Test duration values ​​are now presented in seconds with six digits of precision. Tests without time measurements have been edited. Nov 14, 2024
@coveralls
Copy link

coveralls commented Nov 14, 2024

Coverage Status

coverage: 91.175% (+0.1%) from 91.063%
when pulling e9e7810 on KaganCanSit:feature_test
into e5ec408 on randombit:master.

@KaganCanSit
Copy link
Contributor Author

Even though I checked, I think there are some points I missed. I will review why the checks failed and edit to fix it.

@KaganCanSit KaganCanSit force-pushed the feature_test branch 2 times, most recently from 89c79b2 to 0972b91 Compare November 14, 2024 21:17
…f precision. Tests without time measurements have been edited.
@randombit
Copy link
Owner

@KaganCanSit thank you but this isn't really at all how I planned on addressing this; the problem is precisely that right now the timing start/stop has to have manual calls inserted, and that is error prone and noisy.

@KaganCanSit
Copy link
Contributor Author

@randombit I thought about this too. But I didn't want to change the current code structure. If we can exchange small tips/ideas for this, I would like to work on it.

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