boltdb/bolt — pull request #5 by benbjohnson (2014-02-01 17:40:11+00:00)
Title: Add RWTransaction.Put().

@snormore I have `RWTransaction.Put()` working and it's running with `testing/quick` so it's doing some sweet randomized black box testing.

You can change the parameters of the quick tests with some command line arguments:

```
-quickchecks The number of iterations to perform.
-quick.seed The seed to use for randomizing.
-quick.maxitems The maximum number of items to insert into a DB.
-quick.maxksize The maximum size of a key.
-quick.maxvsize The maximum size of a value.
```

It'll just insert randomly generated keys and values into DBs over and over again -- once per `quickchecks`. There's also a seed value you can use to reproduce a given set of data.

It does an individual write transaction and read transaction for every `Put()` and `Get()`, respectively. I ran it with 1M key/values per database and it seemed to be doing fine. I was on the plane while I was running it and it drained my battery extremely fast so I haven't had a chance to try larger DBs.

I also added two functions for copying the database:

```
(db *DB) Copy(w io.Writer) error
(db *DB) CopyFile(path string) error
```