The import and export commands are a relic of early Bolt when the file
format was not stable. If the file format changed then users could export
their old data and import it into a new database with a new format.
The Bolt DB file format is stable and will not change so this command is no
longer needed.
Thanks to Alejandro Gaviria for pointing this out.
This commit adds the DB.NoSync flag to skip fsync() calls on each commit. This should only
be used for bulk loading as it can corrupt your database in the event of a system failure.
Initial tests show it can provide a 2x speed up for sequential inserts.
This commit removes several memory allocations occurring on every page and also caches the freelist map used when iterating over the pages. This results in significantly better performance.
This commit adds the ability to adjust the fill percentage for splitting nodes. This
works by setting a threshold that is a percentage of a total page size. When that
threshold is crossed during a split then a new node is created.
This is primarily beneficial for append-only workloads.
Fixes#163.
This commit adds -stats-interval to the 'bolt bench' utility. By setting this argument
to an interval greater than 0s, the benchmark tool will output stats as streaming JSON.
This data can, in turn, be graphed to understand performance over time.
This commit adds a --batch-size CLI argument to the 'bolt bench' tool.
This argument will insert into Bolt in smaller batches which is a more
typical use case.
/cc @snormore
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
This commit adds two new commands:
bolt import --input INPUT PATH
bolt export PATH
This exports the database in a simple, nested, key/value JSON document.
Each node in the document has a "key", a "value", and an optional "type".
The key and value fields are both base64 encoded.
I consolidated the DB.Tx() and DB.RWTx() calls into a single
DB.Begin(writable bool) call. This is more consistent with the
database/sql library.
I also changed the DB.Do() and DB.With() call to DB.Update() and
DB.View(), respectively. This is more intuitive and more inline with
other database verbiage.