diff options
author | drebs <drebs@leap.se> | 2017-12-27 14:07:52 -0200 |
---|---|---|
committer | drebs <drebs@leap.se> | 2017-12-27 14:07:52 -0200 |
commit | 0f2bd936335ee64e052aba584ecff851af1418a1 (patch) | |
tree | 148820ef18f36f5a8985e402fcc14120d4d8e9fd | |
parent | f3c77003b987f88005be421dfef09ea0251d7720 (diff) |
[test] use pull producer in blobs fs backend benchmarks
-rw-r--r-- | tests/benchmarks/test_blobs_fs_backend.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/benchmarks/test_blobs_fs_backend.py b/tests/benchmarks/test_blobs_fs_backend.py index 6a74f514..9f1ebf94 100644 --- a/tests/benchmarks/test_blobs_fs_backend.py +++ b/tests/benchmarks/test_blobs_fs_backend.py @@ -3,6 +3,7 @@ from io import BytesIO from leap.soledad.server._blobs import FilesystemBlobsBackend from twisted.internet import defer from twisted.web.client import FileBodyProducer +from twisted.internet._producer_helpers import _PullToPush def create_write_test(amount, size): @@ -37,6 +38,16 @@ class DevNull(object): def write(self, data): pass + def registerProducer(self, producer, streaming): + producer = _PullToPush(producer, self) + producer.startStreaming() + + def unregisterProducer(self): + pass + + def finish(self): + pass + def create_read_test(amount, size): |