Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Slight counting increment bugfix.

  • Loading branch information...
commit d0041b118ba9b26fa4c7f3a3f4e2530aa6002a63 1 parent 670b242
benzenwen benzenwen authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  writer.rb
2  writer.rb
@@ -83,7 +83,7 @@
83 83 while(true)
84 84 doc = docs[rand(3)].dup # MongoDB collection.insert mutates document, editing the _id key; we need a deep dup (copy).
85 85 doc['time'] = Time.now().to_f * 1000 # Switch to Javascript's convention
86   - doc['ordinal'] = i + 1
  86 + doc['ordinal'] = i++
87 87 coll.insert(doc, :safe => true)
88 88 debug ? pp(doc) : puts("Inserting #{doc['messagetype']} message")
89 89 sleep(rate)

0 comments on commit d0041b1

Please sign in to comment.
Something went wrong with that request. Please try again.