diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-20 16:16:41 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2021-05-20 16:16:41 +0200 |
commit | 5ff0cec38de7b526ea5e8ff547bad6462744b352 (patch) | |
tree | 9f26923d41ec7779e61c15b5a499f9be24cd6b6f | |
parent | 1f9d5a03722b4281f5c34f645bb8c8077c584803 (diff) |
protocol_benchmarks: increase string buffer size
-rwxr-xr-x | lib/protocol_benchmarks.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/protocol_benchmarks.py b/lib/protocol_benchmarks.py index 8fa6620..4e580e9 100755 --- a/lib/protocol_benchmarks.py +++ b/lib/protocol_benchmarks.py @@ -930,7 +930,7 @@ class MPack(DummyProtocol): "mpack_writer_init(&writer, buf, sizeof(buf));\n", [self.max_serialized_bytes], ) - self.dec_buf0 += "char strbuf[16];\n" + self.dec_buf0 += "char strbuf[50];\n" self.from_json(data) def get_serialized_length(self): @@ -972,7 +972,7 @@ class MPack(DummyProtocol): def get_decode_and_output(self): ret = 'kout << dec << "dec:";\n' - ret += "char strbuf[16];\n" + ret += "char strbuf[50];\n" return ret + self.dec_buf + "kout << endl;\n" def get_decode_vars(self): @@ -1563,9 +1563,9 @@ class XDR(DummyProtocol): # By default, XDR does not even include a version / protocol specifier. # This seems rather impractical -> emulate that here. # self.enc_buf += 'xdrstream << (uint32_t)22075;\n' - self.dec_buf += "char strbuf[16];\n" + self.dec_buf += "char strbuf[50];\n" # self.dec_buf += 'xdrinput.get_uint32();\n' - self.dec_buf0 += "char strbuf[16];\n" + self.dec_buf0 += "char strbuf[50];\n" # self.dec_buf0 += 'xdrinput.get_uint32();\n' self.from_json(data) @@ -1691,9 +1691,9 @@ class XDR16(DummyProtocol): # By default, XDR does not even include a version / protocol specifier. # This seems rather impractical -> emulate that here. # self.enc_buf += 'xdrstream << (uint32_t)22075;\n' - self.dec_buf += "char strbuf[16];\n" + self.dec_buf += "char strbuf[50];\n" # self.dec_buf += 'xdrinput.get_uint32();\n' - self.dec_buf0 += "char strbuf[16];\n" + self.dec_buf0 += "char strbuf[50];\n" # self.dec_buf0 += 'xdrinput.get_uint32();\n' self.from_json(data) |