Commit Graph

1444 Commits

Author SHA1 Message Date
Kevin Clark
d271979bf2 rb: Catch TransportException errors during the benchmark and report them
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669031 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:37 +00:00
Kevin Clark
1e8f5208e6 rb: flush STDOUT after starting the benchmark server to properly kickstart the benchmark
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669030 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:33 +00:00
Kevin Clark
1a95a1d5ad rb: Give the benchmark server more time to start up
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669029 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:28 +00:00
Kevin Clark
b679131a16 rb: Turn off debug logging in benchmark/thin_server.rb
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669028 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:23 +00:00
Kevin Clark
66038a0afc rb: Fix some incorrect reporting by the benchmark.
Also make it use -J-server when jruby is the server interpreter


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669027 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:18 +00:00
Kevin Clark
75532eee4c rb: Enhance the output of the benchmark
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669026 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:14 +00:00
Kevin Clark
d3cee029c9 rb: split up benchmark into separate server/client files and distinct interpreters
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669025 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:09 +00:00
Kevin Clark
fb5c0eb2b3 rb: Switch from read_nonblock to readpartial to make jruby happy
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669024 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:19:04 +00:00
Kevin Clark
1aca9c4097 rb: Add spec to ensure UNIXServerSocket deletes the socket when closing
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669023 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:57 +00:00
Kevin Clark
bfb198dae6 rb: Enable logging debug info in benchmark/thin_server.rb
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669022 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:52 +00:00
Kevin Clark
2ddd9d7e2c rb: Tweak the benchmark to allow running the server in a separate process
Add a thin server library that can be run by hand


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669021 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:47 +00:00
Kevin Clark
e1d35fa555 rb: Wrap a semaphore around @serverTransport.close in NonblockingServer.shutdown
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669020 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:41 +00:00
Kevin Clark
2ddd8ed40f rb: Implement Thrift::UNIXSocket and Thrift::UNIXServerSocket
In benchmarking it turns out these don't give any noticeable performance boost,
but as I've already written them, somebody may want them for something.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669019 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:35 +00:00
Kevin Clark
138c0e126f rb: Implement Thrift::Serializer and Thrift::Deserializer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669018 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:28 +00:00
Kevin Clark
c83d4451b7 rb: Add the path to gen-rb to $: in spec_helper instead of in multiple different specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669017 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:21 +00:00
Kevin Clark
c3783f4cdb rb: Don't type-check when given a nil value.
Turn on type-checking for all specs


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669016 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:14 +00:00
Kevin Clark
23193757bc rb: Implement type-checking in Thrift::Struct.new and field accessors
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669015 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:18:07 +00:00
Kevin Clark
140b555bf4 rb: Fix struct_spec to use a proper description
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669014 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:57 +00:00
Kevin Clark
2818b09c87 rb: Add helpers for optional type-checking
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669013 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:51 +00:00
Kevin Clark
e45bf59417 rb: Completely rewrite Thrift::NonblockingServer
It now has a much better and cleaner architecture, a proper persistent thread pool,
a dedicated acceptor thread, and no concurrency issues


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669012 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:44 +00:00
Kevin Clark
3c59aff0b9 rb: Add a hack to prevent fastthread from being loaded when executing specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669011 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:37 +00:00
Kevin Clark
1067425ef7 rb: Enhance non-blocking read in Socket
Also prevent errors when trying to close a @handle twice


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669010 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:30 +00:00
Kevin Clark
7fb207f2f9 rb: Remove an unnecessary return statement
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669009 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:22 +00:00
Kevin Clark
cb344a3b49 rb: Stop using fastthread, it seems to give no benefit and in fact has a bug
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669008 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:14 +00:00
Kevin Clark
ca8a1b3b99 rb: Add benchmarking code for Thrift::NonblockingServer
You can override the server to test with the THRIFT_SERVER env var


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669007 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:17:06 +00:00
Kevin Clark
e4489d3e69 Add synchronization around shared resources in NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669006 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:58 +00:00
Kevin Clark
2e4f9d61dc rb: Enhance the backwards compatibility spec to ensure that the deprecated method names really do correspond to the new method names
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669005 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:50 +00:00
Kevin Clark
4eea89737a rb: Stop calling rspec_clear in specs (which really should have been rspec_reset), as rspec_verify already resets
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669004 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:42 +00:00
Kevin Clark
75a15d8868 rb: Add thrift/protocol/binaryprotocol to the root lib/thrift file to cut down on client-side requires
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669003 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:35 +00:00
Kevin Clark
1535078231 rb: Add spec for shutting down NonblockingServer in response to a client message
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669002 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:27 +00:00
Kevin Clark
6c4598bbc0 rb: Struct#new should properly initialize boolean values
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669001 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:20 +00:00
Kevin Clark
1d4b2d87f7 rb: Thrift::Socket should return false from #open? if an error occurred during a read/write (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669000 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:11 +00:00
Kevin Clark
e0fdddea44 Implement NonblockingServer and add specs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668999 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:16:02 +00:00
Kevin Clark
90a2cbe0a4 Squelch warning about parens and standardize require for generated code
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668998 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:53 +00:00
Kevin Clark
c67587006f Add optional host argument to ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668997 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:45 +00:00
Kevin Clark
c78eeef184 Teach Socket how to read_nonblock
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668996 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:36 +00:00
Kevin Clark
6c30dbbb92 Add a few accessors and specs to prepare for the upcoming NonblockingServer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668995 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:25 +00:00
Kevin Clark
63eb9979d6 Remove dummy initialize method
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668994 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:15 +00:00
Kevin Clark
7019070c92 Rubify Socket and ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668993 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:15:06 +00:00
Kevin Clark
3c4367ae4b Finish rubifying MemoryBuffer and FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668992 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:57 +00:00
Kevin Clark
5a2d0ad20a Make a lot of miscellaneous ruby-styling changes
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668991 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:48 +00:00
Kevin Clark
01a514494d Fix default values of non-primitive types being shared between struct instances (THRIFT-4)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668989 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:36 +00:00
Kevin Clark
ec9106f854 Mark failing tests as pending
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668988 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:26 +00:00
Kevin Clark
45671689ea Fix odd bug in integration tests where it passed the wrong args to an Exception struct initializer
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668987 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:17 +00:00
Kevin Clark
f98286a8e4 Add failing spec for Socket closing when it has an error (THRIFT-7)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668986 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:14:08 +00:00
Kevin Clark
1cfd693f3e Add new spec for properly initializing boolean values
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668985 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:58 +00:00
Kevin Clark
a7613dde90 Add new gen-rb task to rebuild the bundled thrift generated code for specs
Also rewrite the test task to properly abort Rake if it fails


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668984 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:48 +00:00
Kevin Clark
9479b1a593 Add failing spec for sharing of default values between struct instances (THRIFT-4)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668983 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:37 +00:00
Kevin Clark
0d6007c717 Add missing test for ServerSocket
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668982 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:27 +00:00
Kevin Clark
fa4a958589 Add two missing tests for FramedTransport
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668981 13f79535-47bb-0310-9956-ffa450edef68
2008-06-18 01:13:18 +00:00