btreeblock_test.cc (e6449f52) btreeblock_test.cc (2534ac38)
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <pthread.h>
5
6#include "filemgr.h"
7#include "filemgr_ops_linux.h"
8#include "btreeblock.h"

--- 16 unchanged lines hidden (view full) ---

25 int blocksize = nodesize * 2;
26 struct filemgr *file;
27 struct btreeblk_handle btree_handle;
28 struct btree btree;
29 struct filemgr_config config;
30 int i, r;
31 uint64_t k,v;
32
1#include <stdio.h>
2#include <stdlib.h>
3#include <string.h>
4#include <pthread.h>
5
6#include "filemgr.h"
7#include "filemgr_ops_linux.h"
8#include "btreeblock.h"

--- 16 unchanged lines hidden (view full) ---

25 int blocksize = nodesize * 2;
26 struct filemgr *file;
27 struct btreeblk_handle btree_handle;
28 struct btree btree;
29 struct filemgr_config config;
30 int i, r;
31 uint64_t k,v;
32
33 memset(&config, 0, sizeof(config));
33 config.blocksize = blocksize;
34 config.ncacheblock = 1024;
35 config.flag = 0x0;
36 r = system("rm -rf ./dummy");
37 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
38 btreeblk_init(&btree_handle, file, nodesize);
39
40 btree_init(&btree, (void*)&btree_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, ksize, vsize, 0x0, NULL);

--- 68 unchanged lines hidden (view full) ---

109 struct btreeblk_handle btree_handle;
110 struct btree btree;
111 struct btree_iterator bi;
112 struct filemgr_config config;
113 btree_result br;
114 int i, r;
115 uint64_t k,v;
116
34 config.blocksize = blocksize;
35 config.ncacheblock = 1024;
36 config.flag = 0x0;
37 r = system("rm -rf ./dummy");
38 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
39 btreeblk_init(&btree_handle, file, nodesize);
40
41 btree_init(&btree, (void*)&btree_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, ksize, vsize, 0x0, NULL);

--- 68 unchanged lines hidden (view full) ---

110 struct btreeblk_handle btree_handle;
111 struct btree btree;
112 struct btree_iterator bi;
113 struct filemgr_config config;
114 btree_result br;
115 int i, r;
116 uint64_t k,v;
117
118 memset(&config, 0, sizeof(config));
117 config.blocksize = blocksize;
118 config.ncacheblock = 0;
119 config.flag = 0x0;
120 r = system("rm -rf ./dummy");
121 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
122 btreeblk_init(&btree_handle, file, nodesize);
123
124 btree_init(&btree, (void*)&btree_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, ksize, vsize, 0x0, NULL);

--- 56 unchanged lines hidden (view full) ---

181 int nodesize = sizeof(struct bnode) + 16*4;
182 int blocksize = nodesize * 4;
183 struct filemgr *file;
184 struct btreeblk_handle btreeblk_handle;
185 struct btree btree_a, btree_b;
186 struct filemgr_config config;
187 uint64_t k,v;
188
119 config.blocksize = blocksize;
120 config.ncacheblock = 0;
121 config.flag = 0x0;
122 r = system("rm -rf ./dummy");
123 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
124 btreeblk_init(&btree_handle, file, nodesize);
125
126 btree_init(&btree, (void*)&btree_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, ksize, vsize, 0x0, NULL);

--- 56 unchanged lines hidden (view full) ---

183 int nodesize = sizeof(struct bnode) + 16*4;
184 int blocksize = nodesize * 4;
185 struct filemgr *file;
186 struct btreeblk_handle btreeblk_handle;
187 struct btree btree_a, btree_b;
188 struct filemgr_config config;
189 uint64_t k,v;
190
191 memset(&config, 0, sizeof(config));
189 config.blocksize = blocksize;
190 config.ncacheblock = 1024;
191 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
192 btreeblk_init(&btreeblk_handle, file, nodesize);
193
194 btree_init(&btree_a, (void*)&btreeblk_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, 8, 8, 0x0, NULL);
195 btree_init(&btree_b, (void*)&btreeblk_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, 8, 8, 0x0, NULL);
196

--- 31 unchanged lines hidden ---
192 config.blocksize = blocksize;
193 config.ncacheblock = 1024;
194 file = filemgr_open("./dummy", get_linux_filemgr_ops(), config);
195 btreeblk_init(&btreeblk_handle, file, nodesize);
196
197 btree_init(&btree_a, (void*)&btreeblk_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, 8, 8, 0x0, NULL);
198 btree_init(&btree_b, (void*)&btreeblk_handle, btreeblk_get_ops(), btree_kv_get_ku64_vu64(), nodesize, 8, 8, 0x0, NULL);
199

--- 31 unchanged lines hidden ---