Fix a few typos in benchmarks
This commit is contained in:
@@ -10,7 +10,7 @@ import argparse
|
|||||||
def parse_args():
|
def parse_args():
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
parser.add_argument('-l', "--langs", help="Add languages to test, ie: -l capnproto -l protobuf", action='append', default=['pycapnp', 'pyproto', 'pyproto_cpp'])
|
parser.add_argument('-l', "--langs", help="Add languages to test, ie: -l capnproto -l protobuf", action='append', default=['pycapnp', 'pyproto', 'pyproto_cpp'])
|
||||||
parser.add_argument("-r", "--reuse", help="If this flag is passed, re-use tests will be run", action='store_true',)
|
parser.add_argument("-r", "--reuse", help="If this flag is passed, re-use tests will be run", action='store_true')
|
||||||
parser.add_argument("-c", "--compression", help="If this flag is passed, compression tests will be run", action='store_true')
|
parser.add_argument("-c", "--compression", help="If this flag is passed, compression tests will be run", action='store_true')
|
||||||
parser.add_argument("-i", "--scale_iters", help="Scaling factor to multiply the default iters by", type=float, default=1.0)
|
parser.add_argument("-i", "--scale_iters", help="Scaling factor to multiply the default iters by", type=float, default=1.0)
|
||||||
|
|
||||||
@@ -33,7 +33,7 @@ def run_one(prefix, name, mode, iters, faster, compression):
|
|||||||
data = {}
|
data = {}
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
sys.stderr.write(' '.join(command) + ' failed to run with errors: ' + res + '\n')
|
sys.stderr.write(' '.join(command) + ' failed to run with errors: \n' + res + '\n')
|
||||||
sys.stderr.flush()
|
sys.stderr.flush()
|
||||||
else:
|
else:
|
||||||
res = res.strip()
|
res = res.strip()
|
||||||
|
|||||||
@@ -11,9 +11,14 @@ class Benchmark:
|
|||||||
def __init__(self, compression):
|
def __init__(self, compression):
|
||||||
self.Request = catrank_capnp.SearchResultList.new_message
|
self.Request = catrank_capnp.SearchResultList.new_message
|
||||||
self.Response = catrank_capnp.SearchResultList.new_message
|
self.Response = catrank_capnp.SearchResultList.new_message
|
||||||
self.from_bytes_request = catrank_capnp.SearchResultList.from_bytes
|
if compression == 'packed':
|
||||||
self.from_bytes_response = catrank_capnp.SearchResultList.from_bytes
|
self.from_bytes_request = catrank_capnp.SearchResultList.from_bytes_packed
|
||||||
self.to_bytes = lambda x: x.to_bytes()
|
self.from_bytes_response = catrank_capnp.SearchResultList.from_bytes_packed
|
||||||
|
self.to_bytes = lambda x: x.to_bytes_packed()
|
||||||
|
else:
|
||||||
|
self.from_bytes_request = catrank_capnp.SearchResultList.from_bytes
|
||||||
|
self.from_bytes_response = catrank_capnp.SearchResultList.from_bytes
|
||||||
|
self.to_bytes = lambda x: x.to_bytes()
|
||||||
|
|
||||||
def setup(self, request):
|
def setup(self, request):
|
||||||
goodCount = 0
|
goodCount = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user