Skip to content

test: remove excessively poor performance - #2410

Closed
trevnorris wants to merge 1 commit into
nodejs:masterfrom
trevnorris:make-stringbytes-test-fast
Closed

test: remove excessively poor performance#2410
trevnorris wants to merge 1 commit into
nodejs:masterfrom
trevnorris:make-stringbytes-test-fast

Conversation

@trevnorris

Copy link
Copy Markdown
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
Copy Markdown
Member

LGTM

@trevnorris

Copy link
Copy Markdown
ContributorAuthor

@brendanashworthbrendanashworth added the test Issues and PRs related to the tests. label Aug 17, 2015
@rvagg

Copy link
Copy Markdown
Member

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

@Qard

Qard commented Aug 18, 2015

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

LGTM and what @Qard said makes sense.

@Trott

Copy link
Copy Markdown
Member

@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.

@TrottTrott mentioned this pull request Aug 18, 2015
@Fishrock123

Copy link
Copy Markdown
Contributor

cc @trevnorris, ci looks good. LGTM.

@trevnorris

Copy link
Copy Markdown
ContributorAuthor

Thanks for the reminder. Had forgotten about this one.

Landed in bfb5a58eab3.

@jbergstroem

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
Contributor

Here's what happened: #2544 (comment)

@trevnorris
trevnorris deleted the make-stringbytes-test-fast branch October 7, 2015 21:25
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@trevnorris@bnoordhuis@rvagg@Qard@thefourtheye@Trott@Fishrock123@jbergstroem@orangemocha@brendanashworth