Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Initalize ¶
func Initalize(pstrTestType string, pITestCount interface{}, parrErrRates []float64, pOutput *Output)
Set up the testing environment with the test type, number of changes/iterations or duration in seconds, and error rates. This is PER error rate. i.e. 5 minutes and ten error rates will be 50 minutes. Test types: 'iteration' - increments for each bit flipped 'variable' - increments for each variable, regardless of bits flipped 'time' - checks against passage of time since started
Types ¶
type Config ¶
type Config struct { Initialized bool `json:"initialized"` Path string `json:"path"` State struct { TestType string `json:"test_type"` TestCounter int `json:"test_counter"` Iterations int `json:"iterations"` VariablesChanged int `json:"variables_changed"` Duration time.Duration `json:"duration"` StartTime time.Time `json:"start_time"` RateIndex int `json:"rate_index"` ErrorRates []int `json:"error_rates"` } `json:"state_variables"` Server struct { Post bool `json:"post"` Host string `json:"host"` } `json:"server"` }
TODO: Import from config
type IBitFlip ¶
type IBitFlip interface { Initalize(pstrTestType string, pITestCount interface{}, parrErrRates []float64, pOutput Output) BitFlip(pbigNum *big.Int) *big.Int }
TODO: Populate with remaining functions
type Output ¶
type Output struct {
Data []ErrorRate
}
func (*Output) BitFlip ¶
BitFlip will run the odds of flipping a bit within pbigNum based on error rate pdecRate. The iteration count will increment and both the new number and the iteration error data will be returned.
func (Output) MarshalIndent ¶
Click to show internal directories.
Click to hide internal directories.