Permalink
Browse files

minor: fixes for benchmarks and byte buffer defaults

  • Loading branch information...
1 parent 572bf10 commit 039484c26332ac43c50d3df4029a05b992446d2c @banker banker committed Nov 16, 2009
Showing with 5 additions and 2 deletions.
  1. +4 −1 bin/standard_benchmark
  2. +1 −1 lib/mongo/util/byte_buffer.rb
View
5 bin/standard_benchmark
@@ -1,8 +1,11 @@
#!/usr/bin/env ruby
+#$LOAD_PATH[0,0] = File.join(File.dirname(__FILE__), '..', 'lib')
#
# Note: Ruby 1.9 is faster than 1.8, as expected.
+# This suite will be run again the installed version of ruby-mongo-driver.
+# The c-extension, mongo_ext, will be used if installed.
-$LOAD_PATH[0,0] = File.join(File.dirname(__FILE__), '..', 'lib')
+require 'rubygems'
require 'mongo'
include Mongo
View
2 lib/mongo/util/byte_buffer.rb
@@ -21,7 +21,7 @@ class ByteBuffer
def initialize(initial_data=[])
@buf = initial_data
- @cursor = 0
+ @cursor = @buf.length
@order = :little_endian
@int_pack_order = 'V'
@double_pack_order = 'E'

0 comments on commit 039484c

Please sign in to comment.