Skip to content
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

Fake: move configurable sleep to the end of initFile #3804

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

melissalinkert
Copy link
Member

If it's at the beginning of initFile, then the sleep happens before sleepInitFile can be parsed.

Noticed while trying to write a test for glencoesoftware/bioformats2raw#136.

Compare showinf test&sleepInitFile=1000.fake with and without this PR; with this PR, the printed initialization time should be approximately 1 second longer.

If it's at the beginning of initFile, then the sleep happens before `sleepInitFile`
can be parsed.
melissalinkert added a commit to melissalinkert/bioformats2raw that referenced this pull request Mar 31, 2022
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

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

Makes complete sense.
Without this PR

build@6a7f00715965:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 0.094s
build@6a7f00715965:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 0.088s
build@6a7f00715965:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 0.091s

With this PR included

build@ae500cd2a479:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 1.116s
build@ae500cd2a479:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 1.087s
build@ae500cd2a479:~$ /bio-formats-build/bioformats/tools/showinf -nopix "test&sleepInitFile=1000.fake" | grep Initi
Initializing reader
Initialization took 1.094s

@sbesson sbesson merged commit 3d73a85 into ome:develop Apr 4, 2022
@dgault dgault added this to the 6.9.1 milestone Apr 20, 2022
@melissalinkert melissalinkert deleted the fake-sleep branch September 6, 2024 19:03
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