Commit Graph

196 Commits (78e38f59ad9f7fbb6a68a5f254aec7d9bae428c3)

Author SHA1 Message Date
Robert Kowalski efa47e593d benchmark: add test for module loader
Adds a test for benchmarking the module loader, needed for benchmarking
changes / refacortings in the module loader.

Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Reviewed-by: Timothy J Fontaine <tjfontaine@gmail.com>
2014-09-24 15:48:55 -07:00
Ben Noordhuis 8ae32a9864 bench: fix buffers/buffer-base64-encode benchmark
The test is supposed to measure the performance of the base64 encoder
so move the Buffer#write() calls out of the benchmark section.

The overhead of the calls isn't terrible (about 1-3%) but having
unrelated activity in a micro-benchmark is never a good idea.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-06-04 14:37:27 -07:00
Raymond Feng 329103540c doc: Add a README for benchmark tests
The README.md documents how to run node core benchmark tests and
how to write new tests.
2014-05-28 11:58:08 -07:00
Raymond Feng 4c672c8a5e benchmark: Add a test to measure Buffer.slice perf
Buffer.slice can be expensive. One regression was reported by https://github.com/joyent/node/issues/7633. The method should be benchmarked.
2014-05-28 11:57:05 -07:00
Sean McArthur 226f98a356 buffer: add compare and equals methods
compare() works like String.localeCompare such that:

    Buffer.compare(a, b) === a.compare(b);

equals() does a native check to see if two buffers are equal.

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-04-28 22:09:48 -07:00
Nick Apperson d4fcb23e38 buffer: improve {read,write}{U}Int* methods
Increase the performance and simplify the logic of Buffer#write{U}Int*
and Buffer#read{U}Int* methods by placing the byte manipulation code
directly inline.

Also improve the speed of buffer-write benchmarks by creating a new
call directly to each method by using Function() instead of calling by
buff[fn].

Signed-off-by: Trevor Norris <trev.norris@gmail.com>
2014-04-01 17:31:28 -07:00
Timothy J Fontaine bfc823de90 benchmark: update to use new wrk 2014-02-25 11:28:46 -08:00
Fedor Indutny 9836a4eeda stream_wrap: use `uv_try_write` where possible
Use `uv_try_write` for string and buffer writes, thus avoiding to do
allocations and copying in some of the cases.
2014-01-29 02:49:03 +04:00
Fedor Indutny f5ab3e4c5c benchmark: fixate `ciphers` in tls benchmarks
Benchmark should always use the same cipher in order to be truthful.
2013-12-07 02:32:03 +04:00
Jackson Tian 60958d235d benchmark: Correct the bufferSize to highWaterMark
The bufferSize has been removed. Use highWaterMark instead of.
2013-11-06 16:32:22 +04:00
Ben Noordhuis df3537102b benchmark: add http chunked encoding benchmarks
Test both "Content-Length: xxx" and "Transfer-Encoding: chunked" responses in
the http/simple benchmark.
2013-11-01 15:44:44 +01:00
isaacs 2be09f9493 Merge remote-tracking branch 'ry/v0.10' 2013-08-31 17:58:44 -07:00
isaacs 00a1d3633c benchmark: Fix execArgv handling
Bug in 01f3b46 causes the same benchmark to be run repeatedly.

Not so useful for the compare scripts.
2013-08-31 17:58:17 -07:00
isaacs cece100082 Merge remote-tracking branch 'ry/v0.10' 2013-08-31 11:29:51 -07:00
isaacs 01f3b468a9 benchmark: Support passing v8 flags to benchmarks
The better to test --use-strict effects on performance.

(Spoiler: it has no measurable effect on performance.)
2013-08-31 10:36:44 -07:00
Matthew Aynalem c171c490f2 fixes #6031 spelling errors
explictly => explicitly
accesss => access
througput => throughput
epxression => expression
communiction => communication
becuase => because
repersent => represent
condonitions => conditions
decompresion => decompression
intentially => intentionally
eventes => events
listning => listening
resicved => received
becuase => because
fundimental => fundamental
colapse => collapse
privlages => privileges
sufficently => sufficiently
hapepns => happens
expliclitly => explicitly
thier => their
shold => should
2013-08-19 16:42:16 -07:00
Trevor Norris 9a29aa8c55 benchmark: update misc to new v8 API 2013-08-01 15:02:38 -07:00
Ben Noordhuis d75f67f949 bench: fix up benchmarks after internal api change 2013-07-20 12:13:54 +02:00
Trevor Norris 22668db73d benchmark: update callbacks only receive data
Since the SlabAllocator was removed the buffer length/offset is no
longer sent to the onread callback. The benchmarks have been updated to
reflect that.
2013-07-08 16:53:41 -07:00
isaacs ba048e72b0 Merge remote-tracking branch 'ry/v0.10'
Conflicts:
	AUTHORS
	ChangeLog
	configure
	deps/uv/ChangeLog
	deps/uv/src/unix/darwin.c
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/v8/src/isolate.cc
	deps/v8/src/version.cc
	lib/http.js
	src/node_version.h
2013-05-27 14:46:52 -07:00
Ben Noordhuis fda2b319dc http: save roundtrips, convert buffers to strings
This commit adds an optimization to the HTTP client that makes it
possible to:

* Pack the headers and the first chunk of the request body into a
  single write().

* Pack the chunk header and the chunk itself into a single write().

Because only one write() system call is issued instead of several,
the chances of data ending up in a single TCP packet are phenomenally
higher: the benchmark with `type=buf size=32` jumps from 50 req/s to
7,500 req/s, a 150-fold increase.

This commit removes the check from e4b716ef that pushes binary encoded
strings into the slow path. The commit log mentions that:

    We were assuming that any string can be concatenated safely to
    CRLF.  However, for hex, base64, or binary encoded writes, this
    is not the case, and results in sending the incorrect response.

For hex and base64 strings that's certainly true but binary strings
are 'das Ding an sich': string.length is the same before and after
decoding.

Fixes #5528.
2013-05-23 02:13:26 +02:00
isaacs 61c9f78c63 Merge remote-tracking branch 'ry/v0.10' into master
Conflicts:
	AUTHORS
	ChangeLog
	deps/uv/ChangeLog
	deps/uv/config-unix.mk
	deps/uv/src/unix/stream.c
	deps/uv/src/version.c
	deps/uv/uv.gyp
	src/node.cc
	src/node_buffer.cc
	src/node_crypto.cc
	src/node_version.h
	src/stream_wrap.cc
	src/stream_wrap.h
2013-05-17 14:04:54 -07:00
isaacs 201baa273b benchmark: hash stream 2013-05-14 11:36:04 -07:00
Fedor Indutny f2d5cea73a benchmark: add chunked-encoding benchmark 2013-04-27 21:03:40 +04:00
Ben Noordhuis 05bd6b7bcd bench: add child process read perf benchmark 2013-03-25 13:16:07 +01:00
Trevor Norris 31314b6978 bench: compare binaries equal times
The benchmark compare would drop the last run of the binary pairs. So
when they were only run once an error would arise because no data was
generated for the second binary.
2013-03-20 20:25:48 +01:00
Ben Noordhuis 3dac421393 bench: add dgram send/recv benchmark 2013-03-20 17:16:30 +01:00
isaacs d62cf59dc1 http: Don't hot-path end() for large buffers
The benefits of the hot-path optimization below start to fall off when
the buffer size gets up near 128KB, because the cost of the copy is more
than the cost of the extra write() call.  Switch to the write/end method
at that point.

Heuristics and magic numbers are awful, but slow http responses are
worse.

Fix #4975
2013-03-14 08:04:59 -07:00
isaacs e7b8bad3d9 bench: Do math on numbers in compare.js, not strings 2013-03-07 11:56:53 -08:00
isaacs db5d58e842 bench: Use environ to run compares more than once
This will run the benchmarks the number of times specified by NODE_BENCH_RUNS,
to attempt to reduce variability.

If the number of runs is high enough, it'll also throw out the top and bottom
quartiles, since that's where the outliers will be.

It's not very fancy statistics-fu, but it's better than nothing.

Also, linted this file.  It had tabs in it.  TABS!
2013-03-06 12:33:05 -08:00
isaacs e4383c0170 bench: Add flag to be silent in runner
This is helpful in tracking down bailouts and deopts in Stream classes,
without triggering one from the string write in console.log
2013-03-05 14:23:01 -08:00
isaacs 88befa6021 bench: Make http easier to profile
Do not run the http/simple.js server in a child process.

Fix #4831
2013-02-25 17:47:28 -08:00
isaacs 053e02ef8e benchmark: Fix alignment issues on --html compare output 2013-02-20 09:17:29 -08:00
isaacs bd4d585b7a bench: Add bench-crypto 2013-02-19 17:16:55 -08:00
isaacs 4b80f217cd bench: Simplify duration arguments to benchmarks
For throughput benchmarks, run with just 5s durations rather than 1s and 3s.

For startup benchmark, run with just a single 1s duration, since it's very
consistent anyway.
2013-02-19 17:16:55 -08:00
isaacs 2ed56e5235 bench: Consistency in benchmark filenames 2013-02-19 17:16:55 -08:00
isaacs 06fbcca6bb bench: Remove _bench_timer (no loner used) 2013-02-19 17:16:55 -08:00
isaacs ef08f0fbb1 bench: Use wrk for http benchmarking
Remove ab, since it's no longer used.
2013-02-19 17:16:29 -08:00
isaacs 035aa6b4ce bench: Show % change rather than % difference 2013-02-19 14:14:39 -08:00
isaacs 087c437961 bench: Add --html to compare script 2013-02-19 14:14:38 -08:00
isaacs 7658f4c29c bench: Fail gracefully if function_call binding fails 2013-02-19 14:14:38 -08:00
isaacs 7d51745827 bench: Remove old run script 2013-02-19 14:14:37 -08:00
isaacs 0a406869df bench: Replace tls-fragmentation with tls/throughput 2013-02-19 14:14:37 -08:00
isaacs bafc51c0f9 bench: Move tls-connect into benchmark/tls
Also, make it work properly with current node.
2013-02-19 14:14:37 -08:00
isaacs 8c719f7c71 bench: Make io.c output easier to read 2013-02-19 14:14:37 -08:00
isaacs 8a3f52170e bench: Remove io.js
Better covered by the other benchmark/fs scripts.
2013-02-19 14:14:36 -08:00
isaacs 2a64edb025 bench: Add fs write stream throughput 2013-02-19 14:14:36 -08:00
isaacs 1fc6f99340 bench: Add read-stream throughput 2013-02-19 14:14:36 -08:00
isaacs 6d116be7cf bench: Move fs-readfile.js to fs/readfile.js 2013-02-19 14:14:35 -08:00
isaacs 844b33205c bench: Move v8_bench into misc 2013-02-19 14:14:35 -08:00