Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MB-5413 Construct document correctly

Also, print out trace messages when exception is launched

Change-Id: I904b1210177ac45d0abc5d1e73b4f28ec4f27dc2
Reviewed-on: http://review.couchbase.org/16991
Tested-by: Farshid Ghods <farshid@couchbase.com>
Reviewed-by: Farshid Ghods <farshid@couchbase.com>
  • Loading branch information...
commit 6d24f600409792c042a75a9cd9d0415f14703dc5 1 parent 54360ea
@bcui6611 bcui6611 authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 cbworkloadgen
View
5 cbworkloadgen
@@ -25,6 +25,8 @@ from couchbase.couchbaseclient import CouchbaseClient
from optparse import OptionParser
from couchbase.util import ProgressBar, StringUtil
import sys
+import uuid
+import traceback
class SharedProgressBar(object):
def __init__(self, number_of_items):
@@ -75,7 +77,7 @@ class SmartLoader(object):
key = "%s-%s" % (options.key_prefix, str(uuid.uuid4())[:5])
if random.randint(0,100) < setPrc:
if options.load_json:
- document = "\"name\":\"pymc-%s\"" % (key, key)
+ document = "\"name\":\"pymc-%s\"" % key
document = document + ",\"age\":%s" % (random.randint(0, 1000))
document = document + ",\"index\":%s" % (i)
document = "{" + document + "}"
@@ -109,6 +111,7 @@ class SmartLoader(object):
v.done()
v = None
except:
+ traceback.print_exec()
if v:
v.done()
Please sign in to comment.
Something went wrong with that request. Please try again.