deploy

package
v0.0.0-...-3b8f57b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2015 License: GPL-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Deterlab is responsible for setting up everything to test the application on deterlab.net Given a list of hostnames, it will create an overlay tree topology, using all but the last node. It will create multiple nodes per server and run timestamping processes. The last node is reserved for the logging server, which is forwarded to localhost:8081

Creates the following directory structure in remote: build/ - where all cross-compiled executables are stored deploy/ - directory to be copied to the deterlab server

The following apps are used:

deter - runs on the user-machine in deterlab and launches the others
logserver - runs on the first three servers - first is the master, then two slaves
forkexec - runs on the other servers and launches exec, so it can measure it's cpu usage

Outputting data: output to csv files (for loading into excel)

make a datastructure per test output file
all output should be in the test_data subdirectory

connect with logging server (receive json until "EOF" seen or "terminating")

  connect to websocket ws://localhost:8080/log
  receive each message as bytes
		 if bytes contains "EOF" or contains "terminating"
      wrap up the round, output to test_data directory, kill deploy2deter

for memstats check localhost:8080/d/server-0-0/debug/vars

parse out the memstats zones that we are concerned with

different graphs needed rounds:

  load on the x-axis: increase messages per round holding everything else constant
			hpn=40 bf=10, bf=50

latency on y-axis, timestamp servers on x-axis push timestampers as higher as possible

Index

Constants

This section is empty.

Variables

View Source
var DefaultRounds int = 1

time-per-round * DefaultRounds = 10 * 20 = 3.3 minutes now this leaves us with 7 minutes for test setup and tear-down

View Source
var FailureTests = []T{
	{0, 64, 16, 30, 50, 0, 0, 0, false, "coll_stamp"},
	{0, 64, 16, 30, 50, 0, 5, 0, false, "coll_stamp"},
	{0, 64, 16, 30, 50, 0, 10, 0, false, "coll_stamp"},
	{0, 64, 16, 30, 50, 5, 0, 5, false, "coll_stamp"},
	{0, 64, 16, 30, 50, 5, 0, 10, false, "coll_stamp"},
	{0, 64, 16, 30, 50, 5, 0, 10, true, "coll_stamp"},
}

nmachs=32, hpn=128, bf=16, rate=500, failures=20, root failures, failures

View Source
var HostsTest = []T{
	{0, 1, 2, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 2, 3, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 4, 3, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 8, 8, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 16, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 32, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 64, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 128, 16, 30, 50, 0, 0, 0, false, "coll_stamp"},
}
View Source
var HostsTestShort = []T{
	{0, 1, 2, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 8, 4, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 32, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 64, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
	{0, 128, 16, 30, 20, 0, 0, 0, false, "coll_stamp"},
}
View Source
var HostsTestSingle = []T{
	{0, 2, 8, 30, 20, 0, 0, 0, false, "coll_stamp"},
}
View Source
var SchnorrHostSingle = []T{
	{8, 2, 2, 30, 20, 0, 0, 0, false, "schnorr_sign"},
}
View Source
var SignTest = []T{
	{0, 1, 2, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 2, 3, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 4, 3, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 8, 8, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 16, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 32, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 64, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 128, 16, 30, 50, 0, 0, 0, false, "coll_sign"},
}
View Source
var SignTestMulti = []T{
	{0, 1, 2, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 8, 8, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 32, 8, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 64, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 128, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 256, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
}
View Source
var SignTestMulti2 = []T{
	{0, 256, 16, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 512, 32, 30, 20, 0, 0, 0, false, "coll_sign"},
	{0, 1024, 64, 30, 20, 0, 0, 0, false, "coll_sign"},
}
View Source
var SignTestSingle = []T{
	{0, 8, 8, 30, 10, 0, 0, 0, false, "coll_sign"},
}
View Source
var StampTestSingle = []T{
	{0, 1, 2,
		30, 20, 0,
		0, 0, false, "coll_stamp"},
}

nmachs, hpn, bf rate, rounds, failures rFail, fFail, testConnect, app

View Source
var VTest = []T{
	{0, 1, 3, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 2, 4, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 4, 6, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 8, 8, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 16, 16, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 32, 16, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 64, 16, 10000000, 20, 0, 0, 0, false, "vote"},
	{0, 128, 16, 10000000, 20, 0, 0, 0, false, "vote"},
}
View Source
var VotingTest = []T{
	{0, 64, 16, 30, 50, 0, 0, 0, true, "coll_stamp"},
	{0, 64, 16, 30, 50, 0, 0, 0, false, "coll_stamp"},
}

Functions

func ArrStats

func ArrStats(stream []float64) (avg float64, min float64, max float64, stddev float64)

func MkTestDir

func MkTestDir()

func MonitorMemStats

func MonitorMemStats(server string, poll int, done chan struct{}, stats *[]*ExpVar)

func RunTests

func RunTests(name string, ts []T)

RunTests runs the given tests and puts the output into the given file name. It outputs RunStats in a CSV format.

func Start

func Start(destination string, nbld bool, build string, machines int)

func TestFile

func TestFile(name string) string

Types

type ClientMsgStats

type ClientMsgStats struct {
	File        string    `json:"file"`
	Type        string    `json:"type"`
	Buckets     []float64 `json:"buck,omitempty"`
	RoundsAfter []float64 `json:"roundsAfter,omitempty"`
	Times       []float64 `json:"times,omitempty"`
}

type Config

type Config struct {
	// Number of machines/nodes
	// Total number of hosts = hpn * nmachs
	Nmachs int
	// How many logservers to start up
	// Total number of servers used: nmachs + nloggers
	Nloggers int
	// hpn is the replication factor of hosts per node: how many hosts do we want per node
	Hpn int
	// bf is the branching factor of the tree that we want to build
	Bf int

	// How many messages to send
	Nmsgs int
	// The speed of messages/s
	Rate int
	// How many rounds
	Rounds int
	// Pre-defined failure rate
	Failures int
	// Rounds for root to wait before failing
	RFail int
	// Rounds for follower to wait before failing
	FFail int

	// Debugging-level: 0 is none - 5 is everything
	Debug int
	// RootWait - how long the root timestamper waits for the clients to start up
	RootWait int
	// Which app to run
	App string
	// Coding-suite to run 	[nist256, nist512, ed25519]
	Suite string
}

func NewConfig

func NewConfig() *Config

type Deter

type Deter struct {
	Config *Config
	// The login on the platform
	Login string
	// The outside host on the platform
	Host string
	// The name of the internal hosts
	Project string
	// Directory where everything is copied into
	DeployDir string
	// Directory for building
	BuildDir string
	// Working directory of deterlab
	DeterDir string

	// Testing the connection?
	TestConnect bool
	// contains filtered or unexported fields
}

func ReadConfig

func ReadConfig(dirOpt ...string) (*Deter, error)

func (*Deter) Build

func (d *Deter) Build(build string) error

func (*Deter) Configure

func (d *Deter) Configure(config *Config)

func (*Deter) Deploy

func (d *Deter) Deploy() error

func (*Deter) Start

func (d *Deter) Start() error

func (*Deter) Stop

func (d *Deter) Stop() error

func (*Deter) WriteConfig

func (d *Deter) WriteConfig(dirOpt ...string)

type ExpVar

type ExpVar struct {
	Cmdline  []string         `json:"cmdline"`
	Memstats runtime.MemStats `json:"memstats"`
}

func Memstats

func Memstats(server string) (*ExpVar, error)

type Platform

type Platform interface {
	Configure(*Config)
	Build(build string) error
	Deploy() error
	Start() error
	Stop() error
}

func NewPlatform

func NewPlatform() Platform

type RunStats

type RunStats struct {
	NHosts int
	Depth  int

	BF int

	MinTime float64
	MaxTime float64
	AvgTime float64
	StdDev  float64

	SysTime  float64
	UserTime float64

	Rate  float64
	Times []float64
}

func Monitor

func Monitor(bf int) RunStats

Monitor monitors log aggregates results into RunStats

func RunStatsAvg

func RunStatsAvg(rs []RunStats) RunStats

func RunTest

func RunTest(t T) (RunStats, error)

hpn, bf, nmsgsG

func (RunStats) CSV

func (s RunStats) CSV() []byte

func (RunStats) CSVHeader

func (s RunStats) CSVHeader() []byte

func (RunStats) TimesCSV

func (s RunStats) TimesCSV() []byte

type StatsEntry

type StatsEntry struct {
	App     string  `json:"eapp"`
	Host    string  `json:"ehost"`
	Level   string  `json:"elevel"`
	Msg     string  `json:"emsg"`
	MsgTime string  `json:"etime"`
	File    string  `json:"file"`
	Round   int     `json:"round"`
	Time    float64 `json:"time"`
	Type    string  `json:"type"`
}

type SysStats

type SysStats struct {
	File     string  `json:"file"`
	Type     string  `json:"type"`
	SysTime  float64 `json:"systime"`
	UserTime float64 `json:"usertime"`
}

type T

type T struct {
	// contains filtered or unexported fields
}

func DepthTest

func DepthTest(hpn, low, high, step int) []T

func DepthTestFixed

func DepthTestFixed(hpn int) []T

func FullTests

func FullTests() []T

func RateLoadTest

func RateLoadTest(hpn, bf int) []T

high and low specify how many milliseconds between messages

func ScaleTest

func ScaleTest(bf, low, high, mult int) []T

Directories

Path Synopsis
deterlab
deter
deter is the deterlab process that should run on the boss node It spawns multiple timestampers and clients, while constructing the topology defined on tree.json.
deter is the deterlab process that should run on the boss node It spawns multiple timestampers and clients, while constructing the topology defined on tree.json.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL