示例#1
0
 def request_messages():
     request_id = "123"
     with open('testdata/not-so-huge-report.json') as json_file:
         data = json.load(json_file)
         for d in data:
             request = profiler_pb2.ProfileRequest(
                 request_id=request_id, json_data=json.dumps(d))
             yield request
示例#2
0
 def request_messages():
     request_id = "123"
     with open('testdata/toeggelomat_join.json') as json_file:
         data = json.load(json_file)
         for d in data:
             request = profiler_pb2.ProfileRequest(
                 request_id=request_id, json_data=json.dumps(d))
             yield request
示例#3
0
 def request_messages():
     for i in range(5):
         request = profiler_pb2.ProfileRequest(
             json_data=json.dumps({
                 'x': 'a',
                 'y': 2
             }))
         yield request
示例#4
0
 def request_messages():
     request_id = "123"
     for i in range(5):
         request = profiler_pb2.ProfileRequest(request_id=request_id,
                                               json_data=json.dumps({
                                                   'x': {
                                                       'test': 1,
                                                       'foo': 'bar'
                                                   },
                                                   'y':
                                                   2
                                               }))
         yield request
示例#5
0
 def request_messages():
     request_id = "123"
     for i in range(5):
         request = profiler_pb2.ProfileRequest(request_id=request_id)
         yield request
示例#6
0
 def request_messages():
     request_id = "123"
     for i in range(5):
         request = profiler_pb2.ProfileRequest(request_id=request_id,
                                               json_data='this crap')
         yield request