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

test: remove excessively poor performance #2410

Closed

Conversation

trevnorris
Copy link
Contributor

String concatenation in the assert messages has drastic impact on test
runtime. Removal of these messages is unlikely to affect debugging if
any breaking changes are made.

Previous time to run:

$ time ./iojs test/parallel/test-stringbytes-external.js

real    0m2.321s
user    0m2.256s
sys     0m0.092s

With fix:

$ time ./iojs test/parallel/test-stringbytes-external.js

real    0m0.518s
user    0m0.508s
sys     0m0.008s

R=@bnoordhuis

String concatenation in the assert messages has drastic impact on test
runtime. Removal of these messages is unlikely to affect debugging if
any breaking changes are made.

Previous time to run:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m2.321s
    user    0m2.256s
    sys     0m0.092s

With fix:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m0.518s
    user    0m0.508s
    sys     0m0.008s
@bnoordhuis
Copy link
Member

LGTM

@trevnorris
Copy link
Contributor Author

@brendanashworth brendanashworth added the test Issues and PRs related to the tests. label Aug 17, 2015
@rvagg
Copy link
Member

rvagg commented Aug 17, 2015

lgtm, nice find, can you speed up MOAR TESTS?

@Qard
Copy link
Member

Qard commented Aug 18, 2015

I feel like assert messages should probably just be code comments in most cases. If you see it, it's because bad stuff happened. If bad stuff happened, you are going to look at the code. If you look at the code, you are going to see the comments that explain why it was making that assertion.

@thefourtheye
Copy link
Contributor

LGTM and what @Qard said makes sense.

@Trott
Copy link
Member

Trott commented Aug 18, 2015

@rvagg Moar test speed-ups did you say?!?! Feel free to give a look (and throw a LGTM if so inclined) at #2393. It shaves 5 seconds off a test.

@Trott Trott mentioned this pull request Aug 18, 2015
@Fishrock123
Copy link
Contributor

cc @trevnorris, ci looks good. LGTM.

@trevnorris
Copy link
Contributor Author

Thanks for the reminder. Had forgotten about this one.

Landed in bfb5a58eab3.

@trevnorris trevnorris closed this Aug 28, 2015
@jbergstroem
Copy link
Member

Holy crap. Keep em comin' @trevnorris :)

trevnorris added a commit that referenced this pull request Sep 1, 2015
String concatenation in the assert messages has drastic impact on test
runtime. Removal of these messages is unlikely to affect debugging if
any breaking changes are made.

Previous time to run:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m2.321s
    user    0m2.256s
    sys     0m0.092s

With fix:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m0.518s
    user    0m0.508s
    sys     0m0.008s

PR-URL: #2410
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
trevnorris referenced this pull request Sep 1, 2015
String concatenation in the assert messages has drastic impact on test
runtime. Removal of these messages is unlikely to affect debugging if
any breaking changes are made.

Previous time to run:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m2.321s
    user    0m2.256s
    sys     0m0.092s

With fix:

    $ time ./iojs test/parallel/test-stringbytes-external.js

    real    0m0.518s
    user    0m0.508s
    sys     0m0.008s

PR-URL: #2544
Reviewed-By: trevnorris - Trevor Norris <trev.norris@gmail.com>
Reviewed-By: thefourtheye - Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@trevnorris
Copy link
Contributor Author

Correction. Actual commit is 37ee43e. The PR-URL in said commit is now wrong because of a miscommunication about how Jenkins worked.

@orangemocha
Copy link
Contributor

Here's what happened: #2544 (comment)

@trevnorris trevnorris deleted the make-stringbytes-test-fast branch October 7, 2015 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants