diff options
author | Brinx <brinx@tp510.a9english.com> | 2013-01-16 22:48:02 +0100 |
---|---|---|
committer | Brinx <brinx@tp510.a9english.com> | 2013-01-16 22:48:02 +0100 |
commit | 76fdb08a8660fc2abe7caecbd2ffca98c9ff06f5 (patch) | |
tree | 51ae5bd398760426e64ff1742b4bc83cbc5c7bba /speed-test | |
parent | 206fb1529bf3bef9c51e9c47dd5b3fa053c485ba (diff) | |
download | larch-76fdb08a8660fc2abe7caecbd2ffca98c9ff06f5.tar.gz |
Fix allow_write
Diffstat (limited to 'speed-test')
-rwxr-xr-x | speed-test | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -15,8 +15,8 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # Excercise my B-tree implementation, for simple benchmarking purposes. -# The benchmark gets a location and an operation count as command line -# arguments. +# The benchmark gets a location and nb of keys to use as command line +# arguments --location=LOCATION and --keys=KEYS. # # If the location is the empty string, an in-memory node store is used. # Otherwise it must be a non-existent directory name. @@ -73,13 +73,13 @@ class SpeedTest(cliapp.Application): raise Exception('You must set number of keys with --keys') if not location: - forest = larch.open_forest(key_size=key_size, node_size=node_size, + forest = larch.open_forest(allow_writes=True, key_size=key_size, node_size=node_size, node_store=larch.NodeStoreMemory) else: if os.path.exists(location): raise Exception('%s exists already' % location) os.mkdir(location) - forest = larch.open_forest(key_size=key_size, node_size=node_size, + forest = larch.open_forest(allow_writes=True, key_size=key_size, node_size=node_size, dirname=location) tree = forest.new_tree() |