about summary refs log tree commit homepage
path: root/test
DateCommit message (Collapse)
2013-04-11Linux::TCP_Info: implement #get! instance method
This allows reusing existing Linux::TCP_Info objects to avoid generating garbage.
2012-06-18test_watcher: fix incorrect request/date comparison
It makes no sense to compare peak times of different queues (active vs queued) against each other.
2012-06-12unix: show zero-value stats for idle listeners
When unix_listener_stats is called without arguments, it should still match the behavior of tcp_listener_stats and return ListenerStats object with zero values. This allows callers to iterate through the results to find the pathnames of all the Unix domain sockets in in listen mode.
2012-06-05unix_listener_stats follows and remembers symlinks
Teach unix_listener_stats to remember the symlink path it followed and have it point to the same object as the resolved (real) socket path. This allows the case where looking up stats by symlinks works if the symlink is given to unix_listener_stats: File.symlink("/real/path/of.sock", "/path/to/link.sock") stats = unix_listener_stats(["/path/to/link.sock"]) stats["/path/to/link.sock"] => # same as stats["/real/path/of.sock"]
2012-06-05resolve symlinks to Unix domain sockets
Raindrops currently fails when provided a symlink to a socket. As this is a common practice for many deployment tools (Vlad, etc.) this patch adds support for finding the realpath prior to looking the socket up in /proc/net/unix [ew: commit message subject] [ew: fixed test to pass under 1.9.3 and 1.8.7: * Tempfile#unlink is unsafe to call if we want to reuse the path, use File.unlink(tmp.path) instead * The return value of File.symlink is zero (or it raises), so it's unusable. * File.symlink will not call #to_path under 1.8.7, so it's necessary to pass pathnames to it, not Tempfile objects. ] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2012-05-18Add method_missing to Raindrops::Middleware::Proxy
This enables it to behave more like a Rack BodyProxy would, delegating methods to its body object when it does not implement them itself. (Also includes a minor grammar fix to a comment.) [ew: minor comment/whitespace fix] Signed-off-by: Eric Wong <normalperson@yhbt.net>
2011-11-14Test suite fix for non-linux users
Most other linux-specific test files have this, but test_linux_tcp_info.rb does not. With this patch, gmake test passes on OpenBSD.
2011-10-12avoid inadvertant object creation with invalid addresses
Just in case somebody tries to scan all addresses, we won't run out of memory as easily.
2011-10-03watcher: add peak times for statistics
It could be useful to know when the first and last peak time of a maximum was.
2011-09-27test: updates for newer Unicorn API
Unicorn.run no longer exists
2011-09-27watcher: add X-Current header to headers
It can be useful to some to see that info all at once without hitting the HTML index page.
2011-06-27Fix bad rescue statements in a couple tests
2011-06-27fix Ruby warnings
Found in the check-warnings target in pkg.mk
2011-06-15test_linux_tcp_info: fix test for higher HZ systems
The last_data_recv field is dependent on the CONFIG_HZ of the kernel, so the stock 250 HZ kernel can change the timing on us.
2011-03-21inet_diag: FD_CLOEXEC for inet_diag sockets by default
Very few programs can take advantage of inheriting FDs across exec() boundaries, and inet_diag sockets have no reason to be used in this way.
2011-03-18watcher: set Expires headers for cache invalidation
We know exactly when to invalidate based on the delay :)
2011-03-16test_raindrops_gc: disable by default
It takes too long
2011-03-16test_linux_all_tcp_listen_stats_leak: fix for 1.8
Apparently 1.8 Test::Unit doesn't like empty test classes
2011-03-16add Watcher Rack application
It does streaming!
2011-03-14linux: unix_listener_stats may scan all paths
This matches behavior of the TCP version.
2011-03-12allow reusing netlink socket for inet_diag
No need to waste resources on creating/destroying a socket.
2011-03-12tests: remove unused_port function
It's not needed since we don't care to rebind sockets
2011-03-12inet_diag: fold all_tcp_listener_stats into tcp_listener_stats
No reason to have an extra method. This also speeds up the multi-listener case for tcp_listener_stats since it avoids expensive sendmsg() syscalls.
2011-03-12inet_diag: stricter IPv6 address parsing
Be stricter about invalid inputs.
2011-03-11linux: method for dumping all TCP listener stats
This is a work-in-progress and will probably be modified before the next release.
2011-03-10tests: only do the GC test on MRI
"Advanced" GCs are typically less aggressive and typically allow much more memory to be used.
2011-03-10tests: ensure munmap() in children don't muck up the parent
Raindrops is designed to work with forking servers after all.
2011-03-11support for Raindrops#size= and Raindrops#evaporate!
This allows limited resizing of the Raindrops memory area since we always over-allocate due to the required page aligment for mmap. It would be nice if mremap() worked with MAP_SHARED, but it does not and triggers a bus error when attempting to access the new area. ref: https://bugzilla.kernel.org/show_bug.cgi?id=8691
2011-03-10test_middleware_unicorn: GC is aggressive!
Oops, don't let GC close our listener before Unicorn can inherit it.
2011-03-09disable aggregate/pmq stuff under 1.8
POSIX message queues needs native threads to function.
2011-03-08preliminary Rack app to track last_data_recv
Seems to basically work
2011-03-04test_linux_tcp_info: add test for last_data_recv
2011-03-04Aggregate support via POSIX message queues
2011-03-01tests: cleaner skipping for missing components
2011-03-01test_linux_tcp_info: workaround for ancient kernels
UGH...
2011-02-25proxy +to_path+ calls in the response body
We need to do this for apps that depend on things like the sendfile() optimizations in Rainbows!
2011-02-23add Raindrops::MAX constant
This is the highest number a counter may be incremented to before it overflows.
2011-02-23linux: add support for TCP_INFO reporting
This returns a Raindrops::TCP_Info object that wraps a tcp_info struct.
2011-02-15middleware: add ipv6 address detection for Unicorn
Since Unicorn and Rainbows! support IPv6 now, it makes sense to support the rfc2732-style addresses it returns.
2011-02-15linux: add ipv6 support for inet_diag
inet_diag already supports AF_INET6.
2011-02-15test_linux: fix STRESS=1 tests
2010-09-18use runtime cache line size detection
Modern glibc can easily return the L1 cache line size with sysconf(3), so we'll use that and avoid paying a size penalty on CPUs with smaller cache lines than 128 (every modern x86 except the idiotic P4). Additionally, if we detect a single CPU machine, avoid paying any padding penalty at all. On machines without the non-portable glibc sysconf(3) enhancements, we'll continue to operate on the assumption of an enormous 128 byte cache line size.
2010-08-04test: make GC test (hopefully) more reliable
It's not pretty...
2010-04-11tests: fix to run under MRI 1.8.6
2010-04-07initial