Skip to content

add SKIP_SLOW_TEST's + slow locator script #11647

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

divinity76
Copy link
Contributor

@divinity76 divinity76 commented Jul 9, 2023

made a script to look for tests everywhere, and run them all 3 times with SKIP_SLOW_TESTS set, and rank them all by best-of-3-runs, and found a couple of slow-ish tests and added SKIP_SLOW_TEST to them.

oh, and the run-tests.php thing is just a performance optimization really, in PHP (and some other languages) ++i is faster than i++ , also i++ is a strange operator, here is what i++ means:

make a copy of i, then increment the original, then return the copy.

by comparison, here is what ++i means:

increment i and return it.

even in GCC you'll see ++i being faster than i++ on -O0 (disable optimizations), but gcc auto-optimize i++ to ++i on O1 and above ~ (at least this was true back in the gcc 4.x days. Remember a story, maybe back in 2006, where we significantly increased the performance of a large binary data format parser on gcc -g (debug) by simply replacing i++ with ++i.. back in those days, gcc's -Og (optimize-and-debug) profile did not exist. )

made a script to look for tests everywhere, and run them all 3 times with SKIP_SLOW_TESTS set, and rank them all by best-of-3-runs, and found a couple of slow-ish tests and added SKIP_SLOW_TEST to them.

oh, and the run-tests.php thing is just a performance optimization really, in PHP (and other languages really) ++i is faster than i++ , also i++ is a strange operator, here is what i++ means:
make a copy of i, then increment the original, then return the copy.

by comparison, here is what ++i means:
increment i.

even in GCC you'll see ++i being faster than i++ on -O0 (disable optimizations), but gcc auto-optimize i++ to ++i on O1 and above ~ (at least this was true back in the gcc 4.x days)
@bukka
Copy link
Member

bukka commented Jul 9, 2023

I would maybe went for marking slow anything over 2s or at least 1.5s so it allows testing sleep(1) reliably always which might be useful in some cases. Think for this pipe one tests we could maybe use usleep but there are still some sitations one slightly.

I think if someone wants really fast run, then anything over 0.5s is slow so alternatively we could have more level. Something like slowish for anything over 0.5s and then slow for anything over 2s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants