Documentation
¶
Index ¶
Constants ¶
const ( RANDOM_ACCESS_PATTERN string = "Random_Distribution" EXPONENTIAL_ACCESS_PATTERN string = "Exponential_Distribution" )
const ACCESS_FREQUENCY_PATTERN string = EXPONENTIAL_ACCESS_PATTERN
const BASIC_UNIT_TIME int = 20 // 60 seconds
The basic unit of time (T)
const BLOCK_CREATE_PERIOD int = 5
Block create period
const END_TEST string = "END_TEST"
const FINALITY int = 6
const LAMBDA_ED float32 = 0.1
Lambda for Exponential Distribution the number of event in TSC0
const MAX_SC int = 4
Max number of storage class
const MAX_SC_PEER int = 7
Max the number of peers for each storage class
const NUM_AP_GEN int = 10
NUM_AP_GEN/TIME_AP_GEN : The rate to access data for access pattern The number of transactions to be read for access pattern
const NUM_TRANSACTION_BLOCK int = 6
The number of transaction in a block IF NUM_TRANSACTION_BLOCK == 0, choose random between 3 to 6
const PROBABILITY_FACTOR_SC0 float32 = 0.6931472 // P : 0.500000, T : 6.931472
const PROBABILITY_FACTOR_SC1 float32 = 1.3862944 // P : 0.750000, T : 13.862944
const PROBABILITY_FACTOR_SC2 float32 = 2.7725887 // P : 0.937500, T : 27.725887
const RATE_TSC int = 10 // x BASIC_UNIT_TIME
Time period for Remove data : T x TSC0 TSC0 : After the time, no access data will be removed from local storage. 1 Minuite : The start time for TS20 to remove objects is 23 minuites after starting simulation so about 50 minute is needed for total simulation time IoT+normal_fridge_1.log has 40057 transactions. We generate a block with 6 transactions and create every 5 seconds, so total simulation time will be around 9.3 hours. Thus, 10 minuites is good for 500 minuites(8.3 hours)
const SIM_SC int = 100
Simulator Storage class : 100
const TIME_AP_GEN int = 10 // Second
The number of time to create accessing transaction for access pattern
const TIME_UPDATE_NEITHBOUR int = 10 //60 // Second
The time to search neighbour nodes to update node info
const TOTAL_TRANSACTIONS int = 40000
Total transactions
const TSC0I float32 = float32(RATE_TSC*BASIC_UNIT_TIME) * PROBABILITY_FACTOR_SC0 / LAMBDA_ED
TSC0 = RATE_TSC x BASIC_UNIT_TIME * (PROBABILITY_FACTOR / LAMBDA_ED)
const TSC1I float32 = float32(RATE_TSC*BASIC_UNIT_TIME) * PROBABILITY_FACTOR_SC1 / LAMBDA_ED
const TSC2I float32 = float32(RATE_TSC*BASIC_UNIT_TIME) * PROBABILITY_FACTOR_SC2 / LAMBDA_ED
Variables ¶
var TSCX = [...]float32{TSC0I, TSC1I, TSC2I, 0}
Array for TSC0 ~ 3
Functions ¶
This section is empty.
Types ¶
This section is empty.