Verified Commit 0f2bd936 authored by drebs's avatar drebs
Browse files

[test] use pull producer in blobs fs backend benchmarks

parent f3c77003
......@@ -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):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment