Skip to content

Conversation

@lgritz
Copy link
Collaborator

@lgritz lgritz commented Nov 9, 2025

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.

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]>
@lgritz
Copy link
Collaborator Author

lgritz commented Nov 10, 2025

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;
Copy link
Contributor

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(...)

Copy link
Collaborator Author

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)
Copy link
Contributor

@jessey-git jessey-git Nov 11, 2025

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Aha, fixing simd_test

…usual standard used elsewhere

Signed-off-by: Larry Gritz <[email protected]>
@lgritz lgritz merged commit 72d7991 into AcademySoftwareFoundation:main Nov 11, 2025
28 of 30 checks passed
@lgritz lgritz deleted the lg-imagespantest branch November 11, 2025 22:33
lgritz added a commit to lgritz/OpenImageIO that referenced this pull request Nov 13, 2025
…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]>
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.

2 participants