Lines Matching full:rpc
84 # GRPC is the general RPC module
120 rpc = m.type
121 if !metadata_to_send.key?(rpc)
122 metadata_to_send[rpc] = {}
126 metadata_to_send[rpc][metadata_key] = metadata_value
176 all_stats_per_method = $accumulated_method_stats.map { |rpc, stats_per_method|
177 [rpc,
193 def execute_rpc_in_thread(op, rpc) argument
195 rpc_stats_key = rpc.to_s
213 $thread_results << [rpc, remote_peer]
218 # send 1 rpc every 1/qps second
240 $rpc_config.rpcs_to_send.each do |rpc|
241 # rpc is in the form of :UNARY_CALL or :EMPTY_CALL here
242 metadata = $rpc_config.metadata_to_send.key?(rpc) ?
243 $rpc_config.metadata_to_send[rpc] : {}
245 $num_rpcs_started_by_method[rpc.to_s] += 1
246 $accumulated_method_stats[rpc.to_s].increment_rpcs_started()
248 if rpc == :UNARY_CALL
253 elsif rpc == :EMPTY_CALL
259 raise "Unsupported rpc #{rpc}"
261 keep_open_threads << execute_rpc_in_thread(op, rpc)
280 # error is counted per individual RPC
287 # both by overall, and broken down per RPC
301 :rpc, :metadata,
309 args['rpc'] = 'UnaryCall'
318 opts.on('--rpc RPCS_TO_SEND', 'list of RPCs to send') do |v|
319 args['rpc'] = v
321 opts.on('--metadata METADATA_TO_SEND', 'metadata to send per RPC') do |v|
355 $RPC_MAP.values.each do |rpc|
356 $num_rpcs_started_by_method[rpc.to_s] = 0
357 $num_rpcs_succeeded_by_method[rpc.to_s] = 0
358 $num_rpcs_failed_by_method[rpc.to_s] = 0
359 $accumulated_method_stats[rpc.to_s] = StatsPerMethod.new
391 if opts['rpc']
392 rpcs_to_send = opts['rpc'].split(',')
395 rpcs_to_send.map! { |rpc| $RPC_MAP[rpc] }