47 Commits

Author SHA1 Message Date
Ivan Valdes
6664240e05
Add comment regarding sudo in Makefile robustness target
Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-10-29 09:38:45 -07:00
Manuel Rüger
ac4f75514d
Add benchmark tooling
This adds benchmarking using cmd/bbolt's bench, inspired on what it's
used in kube-state-matrics.

Co-authored-by: Manuel Rüger <manuel@rueg.eu>
Signed-off-by: Ivan Valdes <ivan@vald.es>

wip

Signed-off-by: Ivan Valdes <ivan@vald.es>
2024-06-27 15:26:58 -07:00
Wei Fu
68ab1a1207 *: run test-robustness with build
Add new recipe to build bbolt command so that we can ensure that
test-robustness recipe is using bbolt with gofail.

Since test-robustness requires root, move `sudo` into test-robustness
recipe. Otherwise, both bbolt binary and gofail code belongs to root
user.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-04 19:19:03 +08:00
Wei Fu
c61a3be3e8 *: introduce nightly run for robustness
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2024-01-02 21:29:51 +08:00
Wei Fu
300e72ab8a tests/robustness: init with powerfailure case
Add `Robustness Test` pipeline for robustness test cases.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-08 09:48:57 +08:00
Wei Fu
b05bec2fe3 tests/*: introduce go-dmflakey
This commit is to add go-binding for go-dmflakey. It's used to simulate
powerfailure with common filesystems.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-12-07 08:55:33 +08:00
ncabatoff
804c83609e Rework assertion to follow etcd approach. Enable assertions in tests.
Signed-off-by: ncabatoff <ncabatoff@hashicorp.com>
2023-10-26 09:19:13 -04:00
James Blair
09b5b50101
Add verification of go imports when running make fmt.
Signed-off-by: James Blair <mail@jamesblair.net>
2023-04-06 22:43:23 +12:00
Benjamin Wang
a12c0c4bd7 test: support enabling strict mode in testing
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-29 08:38:02 +08:00
Benjamin Wang
7054e45233 test: make the test timeout configurable
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-29 08:23:32 +08:00
Benjamin Wang
44cddc6aaf test: run test cases under ./internal/...
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-03-14 15:38:08 +08:00
Benjamin Wang
f10bad3c8f support injecting failpoints and add failpoint github workflow
Implemented first demo "TestFailpoint_MapFail"

Signed-off-by: Benjamin Wang <wachao@vmware.com>
2023-01-16 20:32:16 +08:00
Wei Fu
c1ce3b5ca8 .github: use GOGC=30 to prevent high resource usage
* Remove duplicate targets in Makefile
* Use GOGC=30 to prevent high resource usage

Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-05 13:54:16 +08:00
Wei Fu
b7f2da4843 .github/Makefile: support EXTRA_TESTFLAGS for array freelist
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-04 20:05:20 +08:00
Wei Fu
99a93a69f2 Enable -race in github action
Signed-off-by: Wei Fu <fuweid89@gmail.com>
2023-01-03 14:36:10 +08:00
Benjamin Wang
7cc5901171 Extended the test timeout to 30m
Signed-off-by: Benjamin Wang <wachao@vmware.com>
2022-12-27 14:51:47 +08:00
missinglink
e7e1f0c05a cmd/bbolt: re-enable "bbolt" testing
Signed-off-by: missinglink <insomnia@rcpt.at>
2022-11-30 11:20:27 +01:00
Manuel Rüger
fd6c0aa81a Makefile: Move to golangci-lint 2022-03-26 00:28:02 +01:00
JmPotato
685b13a4ef
Clean and simplify some code (#279)
* Clean and simplify some code

Signed-off-by: JmPotato <ghzpotato@gmail.com>

* Remove unused Makefile content

Signed-off-by: JmPotato <ghzpotato@gmail.com>
2021-05-22 23:29:23 -07:00
Xingyu Chen
8693da9f4d use segregated hashmap to boost the freelist allocate and release performance (#141) 2019-01-25 10:30:05 -08:00
Gyuho Lee
75d4714c2c *: rename "cmd/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:17:28 -07:00
Gyuho Lee
76a4670663 *: update import paths "go.etcd.io/bbolt"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 08:15:54 -07:00
Gyuho Lee
a99fcf0d18 Makefile: update import paths
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-27 19:24:35 -07:00
Anthony Romano
e39821f3de *: fix gofmt errors and makefile test 2017-09-13 14:38:05 -07:00
Anthony Romano
e6a9c1db87 add coverage reports
Fixes #11
2017-08-30 14:22:44 -07:00
Anthony Romano
89b9a2c19e make fmt
* gosimple
* unused
* gofmt
2017-08-10 22:07:25 -07:00
Gyu-Ho Lee
a30394a020 *: update git paths to 'coreos/bbolt' 2017-07-27 14:58:03 -07:00
Ben Johnson
8b08bd4a80 test suite refactoring
This commit refactors the test suite to make it cleaner and to use the
standard testing library better. The `assert()`, `equals()`, and `ok()`
functions have been removed and some test names have been changed for
clarity.

No functionality has been changed.
2016-01-02 21:30:31 -07:00
Ben Johnson
8eaea4c150 Remove errcheck. 2014-06-12 09:32:29 -06:00
Ben Johnson
06b01dbb67 Remove allocations from read-only buckets. 2014-05-23 10:40:09 -06:00
Ben Johnson
782ead0dbf Fix freelist allocation direction.
This commit fixes the freelist so that it frees from the beginning of the data file
instead of the end. It also adds a fast path for pages which can be allocated from
the first free pages and it includes read transaction stats.
2014-05-19 12:08:33 -06: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
105fece47a add bench sub-package 2014-04-18 21:44:47 -05:00
Steven Normore
fdde1bcb06 moar bench package 2014-04-18 21:44:27 -05:00
Ben Johnson
02cd971daa Fix race detector CI. 2014-04-11 15:15:56 -06:00
Ben Johnson
714436100a Merge branch 'master' into nested-keys
Conflicts:
	db_test.go
	tx_test.go
2014-04-11 14:31:34 -06:00
Ben Johnson
e6b5fdc30e Add import/export to CLI.
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.
2014-04-11 14:05:58 -06:00
Ben Johnson
698b07b074 Add nested buckets.
This commit adds the ability to create buckets inside of other buckets.
It also replaces the buckets page with a root bucket.

Fixes #56.
2014-04-11 12:36:54 -06:00
Steven Normore
38b69be680 add ldflags on build with main.commit and main.branch to Makefile 2014-04-09 11:51:43 +00:00
Steven Normore
0781aa9637 add get/build targets to Makefile 2014-04-08 18:03:20 +00:00
Ben Johnson
3c1ecb925e Resolve remaining errcheck warnings. 2014-03-24 07:38:27 -06:00
Ben Johnson
64fcacedfa Add benchmarks. 2014-03-04 13:23:46 -07:00
Ben Johnson
00bdc4757f Add 'make cloc'. 2014-02-20 09:11:52 -07:00
Ben Johnson
6a7be8879b Add Stringer support. 2014-02-16 12:11:10 -07:00
Ben Johnson
7fb06feea4 Add parallel usage test and race detector. 2014-02-15 21:50:34 -07:00
Ben Johnson
509e93dff4 Add freelist. 2014-02-10 14:04:01 -07:00
Ben Johnson
ee24437bfc Initial db.open. 2014-01-11 22:51:01 -07:00