Skip to content

Update test_duration in parallel testsuite#26804

Open
dschuff wants to merge 1 commit intoemscripten-core:mainfrom
dschuff:testtime
Open

Update test_duration in parallel testsuite#26804
dschuff wants to merge 1 commit intoemscripten-core:mainfrom
dschuff:testtime

Conversation

@dschuff
Copy link
Copy Markdown
Member

@dschuff dschuff commented Apr 28, 2026

This makes the "total core time" statistic correct on CI.

This makes the "total core time" statistic correct on CI.
@dschuff dschuff changed the title testtime Update test_duration in parallel testsuite Apr 28, 2026
@dschuff dschuff requested a review from sbc100 April 28, 2026 04:52
result._mirrorOutput = False
finally:
result.elapsed = time.perf_counter() - start_time
result.test_duration = result.elapsed
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

How as this broken exactly?

Do we still need result.elapsed?

I notice we have an addDuration on the result here.. is that use called? Should we call it here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Currently when run on CI the result looks like Total core time: 0.000s. Wallclock time: 551.544s. Parallelization: 0.00x., i.e. the core time is always 0.
I don't know if we need result.elapsed or not.
addDuration() isn't called anywhere in our code AFAICS.
Interestingly this is not an issue locally on my cloudtop, it only seems to be broken on CI. I guess it must have something to do with the unittest library on the system?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

That is a bit curious. On my CI, http://clbri.com:8010/#/builders/11/builds/1486 , I do fix all pythons via pyenv to Python 3.12.3, and there I do see appropriate numbers..

Total core time: 9775.613s. Wallclock time: 116.031s. Parallelization: 84.25x.

The start of the run should have that "info dump", that should print the python version, in case that might be meaningful.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is probably something to do with CI=1 which triggers the XML test runner... which maybe doesn't call addDuration() in the same way?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought that too, except when I run it locally even with CI=1 it still works.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

WTF!

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