def decode(n, proto_factory=TBinaryProtocolFactory()):
    ab = addressbook.AddressBook()
    start = time.time()
    for i in range(n):
        deserialize(ab, ab_encoded, proto_factory)
    end = time.time()
    print('decode\t-> {}'.format((end - start)))
def decode(n, proto_factory=TBinaryProtocolFactory()):
    ab = addressbook.AddressBook()
    start = time.time()
    for i in range(n):
        deserialize(ab, ab_encoded, proto_factory)
    end = time.time()
    print('decode\t-> {}'.format((end - start)))