Commit Graph

323 Commits (a0963d8f2259b9c7f291887979d9dac2441b4ca6)

Author SHA1 Message Date
Ben Johnson 0dfb71267c Merge pull request #144 from benbjohnson/copy-key
Copy key on Put() and CreateBucket().
2014-04-29 09:34:38 -06:00
Ben Johnson e3957cd0de Add Tx.Cursor().
This commit adds the Cursor() function to Tx. This allows iteration on the root bucket
in a similar way to iteration on other buckets.

Fixes #141.
2014-04-29 07:25:14 -06:00
Ben Johnson e3ed193646 Copy key on Put() and CreateBucket().
This commit makes a copy of the key byte slice before inserting into the database.
This fixes the issue where users may reuse byte buffers which can corrupt the database.

Fixes #143.
2014-04-29 06:54:01 -06:00
Ben Johnson 46d83eb140 Merge pull request #142 from extemporalgenome/Printf-byteslice
Printf's %s and %q already do the right thing with []byte
2014-04-25 16:13:24 -06:00
Kevin Gillette 1879d88c43 Printf's %s and %q do the right thing with []byte; removed string conversion. 2014-04-25 15:38:42 -06:00
Martin Kobetic d9e7e0257b add -stats and -batch-size support to bench cmd 2014-04-24 16:30:39 -04:00
Ben Johnson 5524825919 Merge pull request #139 from Shopify/moar_c_cursor
More C cursor improvements
2014-04-23 12:05:53 -06:00
Martin Kobetic 5612ea7694 fix empty byte vs nil test problems 2014-04-23 16:54:41 +00:00
Martin Kobetic 181eb96dc7 add test for empty bucket handling 2014-04-23 15:36:41 +00:00
Martin Kobetic ded351df92 another test case and minor cleanup 2014-04-23 14:25:25 +00:00
Martin Kobetic 9d095430b4 fix deep search 2014-04-23 14:00:53 +00:00
Martin Kobetic 9cc516f8e2 add deep tree tests, some cleanup 2014-04-22 21:20:49 +00:00
Ben Johnson 775e2d6cca Merge pull request #137 from benbjohnson/bucket-stats
Change to BucketStats and Bucket.Stats().
2014-04-22 15:17:09 -06:00
Ben Johnson 0567eea5f5 Change to BucketStats and Bucket.Stats().
This commit pluralizes the BucketStat type to be BucketStats. This makes it
more consistent with the other Stats() calls. This commit also changes the
return type to a struct instead of a pointer.

Finally, this commit adds documentation to the fields of BucketStats.
2014-04-22 15:11:49 -06:00
Ben Johnson 7587e61802 Merge pull request #136 from Shopify/stats_space
Add space stats to the bucket stats
2014-04-22 15:03:07 -06:00
Martin Kobetic a02ddf402b rename MaxDepth to Depth 2014-04-22 20:32:09 +00:00
Martin Kobetic 03cb096230 skip space assertions for incompatible page size 2014-04-22 20:29:37 +00:00
Martin Kobetic 4245fd9c4e allign naming with MemStats 2014-04-22 20:22:18 +00:00
Martin Kobetic 62592ec840 moar tweaks 2014-04-22 20:18:09 +00:00
Martin Kobetic 9c1b768185 update stats test 2014-04-22 18:34:34 +00:00
Martin Kobetic 382ccc2746 add Used/Free Leaf/Branch bucket stats 2014-04-22 18:22:42 +00:00
Ben Johnson afe8123d91 Merge pull request #134 from Shopify/c_cursor
C cursor
2014-04-21 07:24:48 -06:00
Ben Johnson 4b0c7e3d42 Merge pull request #135 from benbjohnson/bench
Bench
2014-04-19 09:09:10 -05:00
Ben Johnson a42d74da7e Add 'bolt bench'.
This commit adds a flexible benchmarking tool to the 'bolt' CLI. It allows
the user to separately specify the write mode and read mode (e.g. sequential
random, etc). It also allows the user to isolate profiling to either the
read or the writes.

Currently the bench tool only supports "seq" read and write modes. It also
does not support streaming of Bolt counters yet.

Fixes #95.

/cc @snormore
2014-04-18 22:15:31 -05:00
Steven Normore 71e91e24b0 move bench package to bench/cmd/bolt/bench 2014-04-18 21:44:48 -05:00
Steven Normore 105fece47a add bench sub-package 2014-04-18 21:44:47 -05:00
Steven Normore 97bd718b02 add benchmarks using Benchmark framework 2014-04-18 21:44:36 -05:00
Steven Normore 29b7d0a9a4 fix basic parallel benchmark 2014-04-18 21:44:36 -05:00
Steven Normore fdde1bcb06 moar bench package 2014-04-18 21:44:27 -05:00
Steven Normore 6957c9d534 initial bench and generate command structure 2014-04-18 21:44:27 -05:00
Martin Kobetic 1bead4401c all tests pass 2014-04-18 00:14:56 +00:00
Martin Kobetic 9a3d0db1b2 trying to fix large seek 2014-04-17 22:01:16 +00:00
Martin Kobetic 194a0967b4 hide the cursor stack details behind function calls (pop/push/current) 2014-04-17 21:25:03 +00:00
Martin Kobetic 846cb9db03 tests pass 2014-04-17 14:02:31 +00:00
Ben Johnson bd8c09e895 Merge branch 'c_cursor' of github.com:Shopify/bolt into c_cursor
Conflicts:
	c/cursor_test.go
2014-04-17 08:26:48 -04:00
Ben Johnson a233966d0c Clean up 2014-04-17 08:25:26 -04:00
Ben Johnson c0ae4881ab Add Cursor.Next() to C cursor. 2014-04-16 15:17:35 -04:00
Steven Normore fe1f861f74 adds cursor iterate test 2014-04-16 15:38:23 +00:00
Ben Johnson a8cb83c008 Fix pointer arithematic. 2014-04-16 11:30:03 -04:00
Steven Normore 32937280c3 wip 2014-04-16 15:00:26 +00:00
Ben Johnson 6903c7447b Merge pull request #131 from benbjohnson/cursor-bucket
Add Cursor.Bucket() function.
2014-04-16 09:40:30 -04:00
Ben Johnson 63a8cddd2b Add Cursor.Bucket() function.
This commit adds an accessor to the Cursor type to retrieve the Bucket that
it was created from.
2014-04-16 09:38:53 -04:00
Steven Normore b178373351 build c/cursor and running tests 2014-04-16 13:29:52 +00:00
Martin Kobetic 4e01c9fd81 fix up the C bits to compile 2014-04-16 13:27:48 +00:00
Martin Kobetic 3ae69d73fb cleanup 2014-04-16 13:27:48 +00:00
Martin Kobetic 8a24e16dfd minor cleanup 2014-04-16 13:27:48 +00:00
Martin Kobetic fd4263d944 first draft 2014-04-16 13:27:48 +00:00
Ben Johnson 184f39b4dc Merge pull request #130 from benbjohnson/create-bucket-api
Return bucket from CreateBucket() functions.
2014-04-16 09:25:57 -04:00
Ben Johnson 2505b9a7dc Return bucket from CreateBucket() functions.
This commit changes the API for:

    Tx.CreateBucket()
    Tx.CreateBucketIfNotExists()
    Bucket.CreateBucket()
    Bucket.CreateBucketIfNotExists()

These functions now return the *Bucket and error instead of just the error.
2014-04-15 23:45:06 -04:00
Ben Johnson 02cd971daa Fix race detector CI. 2014-04-11 15:15:56 -06:00