mirror of
https://github.com/psy0rz/zfs_autobackup.git
synced 2025-06-13 02:12:07 +03:00
previous changes and this fix improved caching (less runs in test_scaling.py)
This commit is contained in:
parent
81d0bee7ae
commit
88d856d813
@ -78,7 +78,8 @@ class TestZfsScaling(unittest2.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
#this triggers if you make a change with an impact of more than O(snapshot_count/2)
|
#this triggers if you make a change with an impact of more than O(snapshot_count/2)
|
||||||
expected_runs=743
|
expected_runs=636
|
||||||
|
print("EXPECTED RUNS: {}".format(expected_runs))
|
||||||
print("ACTUAL RUNS: {}".format(run_counter))
|
print("ACTUAL RUNS: {}".format(run_counter))
|
||||||
self.assertLess(abs(run_counter-expected_runs), dataset_count/2)
|
self.assertLess(abs(run_counter-expected_runs), dataset_count/2)
|
||||||
|
|
||||||
@ -92,6 +93,7 @@ class TestZfsScaling(unittest2.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
#this triggers if you make a change with a performance impact of more than O(snapshot_count/2)
|
#this triggers if you make a change with a performance impact of more than O(snapshot_count/2)
|
||||||
expected_runs=947
|
expected_runs=842
|
||||||
|
print("EXPECTED RUNS: {}".format(expected_runs))
|
||||||
print("ACTUAL RUNS: {}".format(run_counter))
|
print("ACTUAL RUNS: {}".format(run_counter))
|
||||||
self.assertLess(abs(run_counter-expected_runs), dataset_count/2)
|
self.assertLess(abs(run_counter-expected_runs), dataset_count/2)
|
||||||
|
@ -107,7 +107,7 @@ class ZfsNode(ExecuteNode):
|
|||||||
def get_dataset(self, name, force_exists=None):
|
def get_dataset(self, name, force_exists=None):
|
||||||
"""get a ZfsDataset() object from name. stores objects internally to enable caching"""
|
"""get a ZfsDataset() object from name. stores objects internally to enable caching"""
|
||||||
|
|
||||||
return self.__datasets.setdefault(name, ZfsDataset(self, name))
|
return self.__datasets.setdefault(name, ZfsDataset(self, name, force_exists))
|
||||||
|
|
||||||
def reset_progress(self):
|
def reset_progress(self):
|
||||||
"""reset progress output counters"""
|
"""reset progress output counters"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user