mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-24 07:06:41 +00:00
For now, just one share. Plus more docs.
This commit is contained in:
parent
5266adefce
commit
edb2a21204
@ -1,5 +1,5 @@
|
|||||||
"""
|
"""
|
||||||
First attempt at benchmarking immutable uploads and downloads.
|
First attempt at benchmarking uploads and downloads.
|
||||||
|
|
||||||
TODO Parameterization (pytest?)
|
TODO Parameterization (pytest?)
|
||||||
- Foolscap vs not foolscap
|
- Foolscap vs not foolscap
|
||||||
@ -32,22 +32,24 @@ def timeit(name):
|
|||||||
class ImmutableBenchmarks(SystemTestMixin, TestCase):
|
class ImmutableBenchmarks(SystemTestMixin, TestCase):
|
||||||
"""Benchmarks for immutables."""
|
"""Benchmarks for immutables."""
|
||||||
|
|
||||||
|
# To use HTTP, change to true:
|
||||||
FORCE_FOOLSCAP_FOR_STORAGE = False
|
FORCE_FOOLSCAP_FOR_STORAGE = False
|
||||||
|
|
||||||
@async_to_deferred
|
@async_to_deferred
|
||||||
async def test_upload_and_download(self):
|
async def test_upload_and_download_immutables(self):
|
||||||
self.basedir = self.mktemp()
|
self.basedir = self.mktemp()
|
||||||
|
|
||||||
|
# To test larger files, change this:
|
||||||
DATA = b"Some data to upload\n" * 10
|
DATA = b"Some data to upload\n" * 10
|
||||||
|
|
||||||
# 3 nodes
|
# 1 node
|
||||||
await self.set_up_nodes(3)
|
await self.set_up_nodes(1)
|
||||||
|
|
||||||
# 3 shares
|
# 1 share
|
||||||
for c in self.clients:
|
for c in self.clients:
|
||||||
c.encoding_params["k"] = 3
|
c.encoding_params["k"] = 1
|
||||||
c.encoding_params["happy"] = 3
|
c.encoding_params["happy"] = 1
|
||||||
c.encoding_params["n"] = 3
|
c.encoding_params["n"] = 1
|
||||||
|
|
||||||
for i in range(5):
|
for i in range(5):
|
||||||
# 1. Upload:
|
# 1. Upload:
|
||||||
|
Loading…
Reference in New Issue
Block a user