Test duration values are now presented in seconds with six digits of precision. Tests without time measurements have been edited. #4435
+1,404
−34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.