* performance counters
* first cut of perf counters and system table fanout and a wire protocol
* significantly refactored prometheus support; removed statsd and exprvar
* removed node_id
* put dax subquery test back
* Change Translator.TranslateFieldIDs method to take a dax.TableKeyer
There are a bunch of other calls to the Translator interface methods
with currently take an `index string`, and those need to be converted to
dax.TableKeyer as well. But I need to review each call, because in at
least one place I noticed one being called with `result.Index` instead
of with the qtbl available. And I don't yet know how those could be
different.
Co-authored-by: Travis Turner <travis@molecula.com>
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| egpool | ||
| testdata | ||
| batch.go | ||
| batch_test.go | ||
| convert.go | ||
| docker-compose.yml | ||
| Dockerfile-test | ||
| Dockerfile-wait | ||
| error.go | ||
| Makefile | ||
| metrics.go | ||
| README.md | ||
| wait.sh | ||
batch
The batch package provides a standard tool set for batching records in a way
that is most performant for ingesting those records into FeatureBase. The main
implementation is Batch (which can be initated with the NewBatch()
function). The NewBatch() function takes an Importer which contains all of
the methods required to interact with FeatureBase; these include methods for
doing string/id translation as well as for importing shards of data.
IDK uses the batch package internally. Another example where the batch
package is used in the sql3 package. When an "INSERT INTO" statement is
executed, the SQL engine uses a Batch to do key translation and build import
batches prior to doing the final import.
Integration tests
To run the tests, you will need to install the following dependencies:
In addition to these dependancies, you will need to be added to the molecula Gitlab account.
First start the test environment. This is a docker-compose environment that includes featurebase.
make startup
To build and run the integration tests, run:
make test-run-local
Then to shut down the test environment, run:
make shutdown
The previous command is equivalent to running the following:
make startup
sleep 30 # wait for services to come up
make test-run
make shutdown
To run an individual test, you can run the command directly using docker-compose. Note that you must run docker-compose build batch-test for docker to run the latest code. Modify the following as needed:
make startup
docker-compose build batch-test
docker-compose run batch-test /usr/local/go/bin/go test -count=1 -mod=vendor -run=TestCmdMainOne .