From c8c82b6663d122b0933a8459c4710c914edf7f84 Mon Sep 17 00:00:00 2001 From: Victor Shyba Date: Fri, 19 Aug 2016 17:07:04 -0300 Subject: [test] sync without changes Syncing without any changes was reported as slow. This benchmark will help measure it. --- testing/tests/perf/test_sync.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'testing/tests') diff --git a/testing/tests/perf/test_sync.py b/testing/tests/perf/test_sync.py index 146f1394..668ceae7 100644 --- a/testing/tests/perf/test_sync.py +++ b/testing/tests/perf/test_sync.py @@ -57,3 +57,15 @@ def create_download(downloads, size): test_download_20_500k = create_download(20, 500*1000) test_download_100_100k = create_download(100, 100*1000) test_download_1000_10k = create_download(1000, 10*1000) + + +@pytest.inlineCallbacks +@pytest.mark.benchmark(group="test_nothing_to_sync") +def test_nothing_to_sync(soledad_client, txbenchmark_with_setup): + def setup(): + clean_client = soledad_client() + return (clean_client,), {} + + def sync(clean_client): + return clean_client.sync() + yield txbenchmark_with_setup(setup, sync) -- cgit v1.2.3