vnodestats
is used to take statistics on a Moray database, which is part of the
Joyent Manta Project.
vnodestats
currently returns the total number of vnodes (including duplicates),
the number of unique vnodes and the average distance between adjacent vnodes.
This data is used to show that a resharding correctly split the vnode-pnode mapping in two. We expect the average distance between adjacent vnodes to double in a simple resharding where the number of pnodes is doubled.
$ # Copy vnodestats to a postgres zone
$ manta-login postgres
$ ./vnodestats
Build todo:
- In a SmartOS zone
go build
- To cross compile (e.g. on macOS)
GOOS=solaris GOARCH=amd64 go build
The database connection is configured via enviroment variables.
DB_HOST
- defaults to localhostDB_USER
- defaults to postgresDB_PASSWORD
- defaults to postgresDB_DATABASE
- defaults to moray