@@ -104,9 +104,9 @@ def GetSeeds(seed_file_path, count):
104
104
# function: thread worker, pull work item from pool
105
105
# and execute query via runner
106
106
################################################################
107
- def RunKNLatencyThread (graphid , threadId , depth , provider , label , seedPool , reportQueue , iterations ):
107
+ def RunKNLatencyThread (graphid , threadId , depth , provider , label , seedPool , reportQueue , iterations , url ):
108
108
if provider == "redisgraph" :
109
- runner = RedisGraphQueryRunner (graphid , label )
109
+ runner = RedisGraphQueryRunner (graphid , label , url )
110
110
elif provider == "tigergraph" :
111
111
runner = TigerGraphQueryRunner ()
112
112
else :
@@ -151,19 +151,22 @@ def RunKNLatencyThread(graphid, threadId, depth, provider, label, seedPool, repo
151
151
# query for a given set of seeds.
152
152
################################################################
153
153
@click .command ()
154
- @click .option ('--graphid' , '-g' , default = 'graph500-22 ' ,
155
- type = click .Choice (['graph500-22 ' , 'twitter_rv_net' ]), help = "graph id" )
154
+ @click .option ('--graphid' , '-g' , default = 'graph500_22 ' ,
155
+ type = click .Choice (['graph500_22 ' , 'twitter_rv_net' ]), help = "graph id" )
156
156
@click .option ('--count' , '-c' , default = 20 , help = "number of seeds" )
157
157
@click .option ('--depth' , '-d' , default = 1 , help = "number of hops to perform" )
158
158
@click .option ('--provider' , '-p' , default = 'redisgraph' , help = "graph identifier" )
159
+ @click .option ('--url' , '-u' , default = '127.0.0.1:6379' , help = "DB url" )
159
160
@click .option ('--label' , '-l' , default = 'label' , help = "node label" )
161
+ # @click.option('--seed', '-s', default='seed', help="seed file")
160
162
@click .option ('--threads' , '-t' , default = 2 , help = "number of querying threads" )
161
163
@click .option ('--iterations' , '-i' , default = 10 , help = "number of iterations per query" )
162
- def RunKNLatency (graphid , count , depth , provider , label , threads , iterations ):
164
+ def RunKNLatency (graphid , count , depth , provider , label , threads , iterations , url ):
163
165
# create result folder
164
166
global seedReports
165
- seedfile = os .path .join ('data' , graphid + '-seed ' )
167
+ seedfile = os .path .join ('data' , graphid + '_seed ' )
166
168
seeds = GetSeeds (seedfile , count )
169
+ print "## Seeds len {}" .format (len (seeds ))
167
170
168
171
# Create a pool of seeds.
169
172
seedPool = multiprocessing .Queue (len (seeds ) * iterations )
@@ -181,7 +184,7 @@ def RunKNLatency(graphid, count, depth, provider, label, threads, iterations):
181
184
threadsProc = []
182
185
for tid in range (threads ):
183
186
p = multiprocessing .Process (target = RunKNLatencyThread ,
184
- args = (graphid , tid , depth , provider , label , seedPool , reportQueue , iterations ))
187
+ args = (graphid , tid , depth , provider , label , seedPool , reportQueue , iterations , url ))
185
188
threadsProc .append (p )
186
189
187
190
# Launch threads
0 commit comments