Lines Matching refs:tree

85 		// dump the tree
89 // in any case, write the tree back to disk
322 checkTreeContents(BPlusTree* tree)
328 TreeIterator iterator(tree);
338 printf("\ninvalid value %lld in tree: ", value);
350 printf("\nkeys don't match (key index = %lld, %ld times in tree, "
383 checkTreeIntegrity(BPlusTree* tree)
385 TreeIterator iterator(tree);
402 checkTree(BPlusTree* tree)
405 printf("* Check tree...\n");
407 checkTreeContents(tree);
408 checkTreeIntegrity(tree);
411 tree->Validate(false, errorsFound);
423 addAllKeys(Transaction& transaction, BPlusTree* tree)
425 printf("*** Adding all keys to the tree...\n");
427 status_t status = tree->Insert(transaction, (uint8*)gKeys[i].data,
438 checkTree(tree);
443 removeAllKeys(Transaction& transaction, BPlusTree* tree)
445 printf("*** Removing all keys from the tree...\n");
448 status_t status = tree->Remove(transaction, (uint8*)gKeys[i].data,
461 checkTree(tree);
467 duplicateTest(Transaction& transaction, BPlusTree* tree)
488 status = tree->Insert(transaction, (uint8*)gKeys[index].data,
499 checkTree(tree);
516 status_t status = tree->Remove(transaction,
528 checkTree(tree);
533 checkTree(tree);
538 addRandomSet(Transaction& transaction, BPlusTree* tree, int32 num)
540 printf("*** Add random set to tree (%ld to %ld old entries)...\n",
549 printf("adding key %ld (%ld times in the tree)\n", index,
553 status_t status = tree->Insert(transaction, (uint8*)gKeys[index].data,
563 checkTree(tree);
566 checkTree(tree);
571 removeRandomSet(Transaction& transaction, BPlusTree* tree, int32 num)
573 printf("*** Remove random set from tree (%ld from %ld entries)...\n",
594 printf("removing key %ld (%ld times in the tree)\n", index,
598 status_t status = tree->Remove(transaction, (uint8*)gKeys[index].data,
608 checkTree(tree);
611 checkTree(tree);
633 "\t-e\texcessive validity tests: tree contents will be tested after "
726 Inode inode("tree.data", gType | S_ALLOW_DUPS);
733 // Create the tree, the keys, and add all keys to the tree initially
735 BPlusTree tree(transaction, &inode);
736 status_t status = tree.InitCheck();
738 fprintf(stderr, "creating tree failed: %s\n", strerror(status));
753 addAllKeys(transaction, &tree);
761 addRandomSet(transaction, &tree,
763 removeRandomSet(transaction, &tree,
765 duplicateTest(transaction, &tree);
768 removeAllKeys(transaction, &tree);
776 // write the cache back to the tree