-
Notifications
You must be signed in to change notification settings - Fork 647
test: image_span_test reduce benchmark load for debug and CI renders #4951
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: image_span_test reduce benchmark load for debug and CI renders #4951
Conversation
Almost all the other unit tests do this, just adding it to image_span_test: automatic reduction in test load for CI and debug renders by doing fewer time trials. This cuts down on runtime for CI, but stil exercises the test code. Command line arguments allow you to override, in cases where you need really good timing fidelity even for a debug run. Signed-off-by: Larry Gritz <[email protected]>
|
Need this right away to address some CI issues. Will merge shortly if there are no objections. The code changes here are only to unit tests. |
| using namespace OIIO; | ||
|
|
||
|
|
||
| static int iterations = 0; // 1000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like iterations is unused. It's only set, but never passed into something like bench.iterations(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixing
| "image_span_test -- unit test and benchmarks for OpenImageIO/image_span.h\n" OIIO_INTRO_STRING) | ||
| .usage("image_span_test [options]"); | ||
|
|
||
| ap.arg("--iterations %d", &iterations) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Funny stat: There's currently 14 instances of tests that use --iters and 14 instances that use --iterations. This new addition here would tip the scale in favor of using the full --iterations name -- should somebody make them all the same and create a new PR for that?
[EDIT] Actually I miscounted, there's just 1 other test, simd_test.cpp that uses the full --iterations name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, fixing simd_test
912fca1 to
f072ea0
Compare
…usual standard used elsewhere Signed-off-by: Larry Gritz <[email protected]>
f072ea0 to
2f55227
Compare
72d7991
into
AcademySoftwareFoundation:main
…cademySoftwareFoundation#4951) Almost all the other unit tests do this, just adding it to image_span_test: automatic reduction in test load for CI and debug renders by doing fewer time trials. This cuts down on runtime for CI, but stil exercises the test code. Command line arguments allow you to override, in cases where you need really good timing fidelity even for a debug run. Also conform simd_test to the usual standard `-iters` used elsewhere instead of being the one place that uses `-iterations`. --------- Signed-off-by: Larry Gritz <[email protected]>
Almost all the other unit tests do this, just adding it to image_span_test: automatic reduction in test load for CI and debug renders by doing fewer time trials. This cuts down on runtime for CI, but stil exercises the test code. Command line arguments allow you to override, in cases where you need really good timing fidelity even for a debug run.