Categorygithub.com/bmeg/benchtop
repositorypackage
0.0.0-20241007224329-c424dc22e7c5
Repository: https://github.com/bmeg/benchtop.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

benchtop

Command line

Build:

make

Load data

benchtop load test.data embeddings test.ndjson
  • test.data : name of archive
  • embeddings : name of table
  • test.ndjson : file to be loaded

List tables

benchtop tables test.data

Get keys

benchtop keys test.data embeddings

Get records

benchtop get test.data embeddings <key1> <key2> ...

Format

Data is stored in a large binary files and index using Pebble Key Value storage.

Key/Value format

Written using Pebble

Table Entries

Key

bytes05:...
typet<[]byte>
Descprefixuser ID

The user ID is provided by the user, but should be checked to ensure it is unique.

Value

bytes0:44:...
type[]byte
DescBSON formatted Column definitions

First is the Table system ID, which is used as a prefix during key lookup. Then rest of the bytes describe a list of columns and their data types.

Table ID

Key

bytes05:...
typeTuint32
Descprefixsystem table ID

The generated ID for a table.

Value

bytes0:44:...
type[]byte
DescUser ID of table

ID Entries

These map the user specified ID to a data block specified with offset and size.

Key

bytes01:51:...
typekuint32<[]byte>
Descprefixsystem table IDuser row ID

Value

bytes0:88:16
typeuint64uint64
Descoffsetsize

Data file format

Sequentially written BSON entries.