~qeef/draft-devault-bare

9b62b99a2a6e7b5ff77369857b93a2a665640579 — Jiri Vlasak 6 months ago 85d38d0
Use cbor more efficient serializing
1 files changed, 5 insertions(+), 1 deletions(-)

M compare-bare-to-cbor.py
M compare-bare-to-cbor.py => compare-bare-to-cbor.py +5 -1
@@ 151,7 151,11 @@ def measure(number_of_msgs):
            "email": m.email,
            "address": m.address,
            "orders": m.orders})
    cbor_packed = cbor2.dumps(msgs_cbor)
    cbor_packed = cbor2.dumps(
            msgs_cbor,
            datetime_as_timestamp=True,
            value_sharing=True,
            string_referencing=True)
    bare_len = len(msgs_bare.pack()) * 100.0 / raw_len
    bare_gz_len = len(gzip.compress(msgs_bare.pack())) * 100.0 / raw_len
    cbor_len = len(cbor_packed) * 100.0 / raw_len