You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I agree to contribute to the project under Apache 2 License.
To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
The PR is proposed to the proper branch
There is a reference to the original bug report and related work
[N/A] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
Patch to opencv_extra has the same branch name.
The feature is well documented and sample code can be built with the project CMake
Proposal
This PR introduces a new interface to collect the last iteration time of the cv::TickMeter class.
Besides, two more minor changes are included:
Reorder the variables inside the cv::TickeMeter::reset() method so that the order matches the declaration of the variables, which makes visual inspection easier.
const correctness inside the cv::TickMeter::stop() method.
Motivation
When using the cv::TickMeter in a loop or in a continuous processing application, it is sometimes useful to also know the time that the last iteration took, not only the average. For example, if the user wants to report extraordinary deviations from the average, or to debug the application.
In this use case, the current implementation requires that the user implements complicated code externally that could be simply provided by the class in a more elegant way.
Related work
#6821 - Addition of the cv::TickMeter class. #17071 - Addition of methods to get the FPS and average time to the cv::TickMeter class.
Other
I could not find any tests for the cv::TickMeter class. Now that there is increasingly more functionality, not sure if it may now be desirable to start testing this class. I could do so, if desired. We could test:
The consistency between the several getters in different units (i.e., that micro is milli * 1e3, etc.).
That in the first iteration the last iteration needs to be equal to the total time.
Any other ideas?
This is my very first PR and I have read over the different documents on how to contribute. I hope I did not miss any detail, but let me know otherwise :)
I am a bit lost about what is going on with the different CI/CD pipelines. On the first commit I made, some jobs in the GitHub actions failed because of a timeout. Similarly, one of the builds of the PR bot also failed because of the same reason, and the other one reported a failure in the Compare ABI dumps step but somehow still marked it as OK (https://pullrequest.opencv.org/buildbot/builders/precommit_linux64/builds/109089).
Since I suspected that these complains could be unrelated to my changes, I made an empty commit just to trigger the pipelines and then I got everything OK except the Android-Test which again failed with:
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
I have now reverted the second commit so that the history is clean, which will trigger another build, but I am wondering what to do to get this through. So far it seems not very deterministic since for the same code changes I get different results, which leads me to think this may be related to the infrastructure and not the changes (i.e., no enabled runners online or the timeouts). I also do not have macOS/Android device I can try the changes on.
I don't know if I am missing something. Could someone please give me some hints? Maybe @opencv-alalek or @asmorkalov know?
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 Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Proposal
This PR introduces a new interface to collect the last iteration time of the
cv::TickMeter
class.Besides, two more minor changes are included:
cv::TickeMeter::reset()
method so that the order matches the declaration of the variables, which makes visual inspection easier.const
correctness inside thecv::TickMeter::stop()
method.Motivation
When using the
cv::TickMeter
in a loop or in a continuous processing application, it is sometimes useful to also know the time that the last iteration took, not only the average. For example, if the user wants to report extraordinary deviations from the average, or to debug the application.In this use case, the current implementation requires that the user implements complicated code externally that could be simply provided by the class in a more elegant way.
Related work
#6821 - Addition of the
cv::TickMeter
class.#17071 - Addition of methods to get the FPS and average time to the
cv::TickMeter
class.Other
I could not find any tests for the
cv::TickMeter
class. Now that there is increasingly more functionality, not sure if it may now be desirable to start testing this class. I could do so, if desired. We could test:This is my very first PR and I have read over the different documents on how to contribute. I hope I did not miss any detail, but let me know otherwise :)