Documentation ¶
Index ¶
- Constants
- Variables
- func InitPacketInfo(filename string)
- func Maximum(a, b float64) float64
- func NewProcessFactory(env *Environment) func(string, *Host) *Process
- func PIDNextFactory() func() uint64
- func ProcWrapper(processStrategy BaseBehaviourFunction, pi ProcessInterface, data interface{})
- func ProcWrapperTemp(processStrategy func(*Process, interface{}), p *Process, data interface{})
- func RangeParser(flag string) (x1, x2 float64)
- func SIM_get_clockFactory(env *Environment) func() float64
- func SIM_init(packet_config string)
- func SIM_launch_application(FilePath string)
- func SIM_platform_init(FilePath string, flag_disk_amount int)
- func SIM_runFactory(env *Environment) func(float64)
- func UnitToFloatFactory() func(string) float64
- type AnomalyFlags
- type BLOCKSIZE
- type BaseBehaviourFunction
- type BlockParams
- type ClientFlags
- type Closeable
- type CommonPacketInfo
- type ControllerParams
- type Core
- type CoreManager
- type DCAble
- type DeepControllerFlags
- type Environment
- type Event
- type EventQueue
- type EventType
- type File
- type Host
- type JBOD
- type JBODDisks
- type Link
- type MachineInterface
- type NetworkPacket
- type NetworkParams
- type NormalParam
- type Packet
- type Process
- func (process *Process) Daemonize(resource ...Closeable)
- func (process *Process) DetachedSendPacket(packet *Packet, destinationProcess string) interface{}
- func (process *Process) Execute(packet *Packet) (STATUS, float64)
- func (process *Process) GetData() interface{}
- func (process *Process) GetEnv() *Environment
- func (process *Process) GetHost() *Host
- func (process *Process) GetName() string
- func (process *Process) GetPID() uint64
- func (process *Process) GetResumeChan() chan STATUS
- func (process *Process) ReadAsync(storage *Storage, packet *Packet) (*Packet, STATUS)
- func (process *Process) ReadSync(storage *Storage, packet *Packet) (*Packet, STATUS)
- func (process *Process) ReceivePacket(address string) (*Packet, STATUS)
- func (process *Process) RecoveryExecutePacket(packet *Packet) (*Packet, STATUS)
- func (process *Process) SIM_wait(waitTime float64) STATUS
- func (process *Process) SendPacket(packet *Packet, destinationProcess string) STATUS
- func (process *Process) SendToHostWithoutReceive(destinationHost *Host, packet *Packet) STATUS
- func (process *Process) SetHost(host *Host)
- func (process *Process) WriteAsync(storage *Storage, packet *Packet) STATUS
- func (process *Process) WriteSync(storage *Storage, packet *Packet) STATUS
- type ProcessID
- type ProcessInterface
- type RequestType
- type Resource
- type STATUS
- type Storage
- type StoragePacket
- type StorageType
- type SystemFlags
- type TracerFlags
- type Volume
- type VolumePart
Constants ¶
View Source
const ( KB float64 = 1 << (10 * iota) MB GB TB PB EB ZB YB )
Variables ¶
View Source
var CIDNext = PIDNextFactory()
View Source
var GetAllJBODs func() map[string]*JBOD
View Source
var GetAllJBODsSlice func() []*JBOD
View Source
var GetAllLinksMap func() map[string]*Link
View Source
var GetAllVolumes func() map[string]*Volume
============================ Volume functions ============================
View Source
var GetCacheJbod func() *JBOD
View Source
var GetCallbacks func(EventType) []func(*Event)
View Source
var GetFunctionByName func(string) BaseBehaviourFunction
View Source
var GetHostByName func(string) *Host
View Source
var GetHosts func() map[string]*Host
View Source
var GetLinkBetweenHosts func(*Host, *Host) *Link
View Source
var GetLinkByName func(name string) *Link
View Source
var GetLinks func(*Host) []*Link
View Source
var GetPacketByName func(RequestType, string) *Packet
View Source
var GetRandomBlockSize func() string
View Source
var GetRandomPacket func(RequestType) *Packet
View Source
var NewProcess func(string, *Host) *Process
View Source
var PIDNext = PIDNextFactory()
View Source
var SIM_function_register func(string, BaseBehaviourFunction, interface{})
View Source
var SIM_get_clock func() float64
View Source
var SIM_run func(float64)
View Source
var UnitToFloatParser = UnitToFloatFactory()
Functions ¶
func InitPacketInfo ¶
func InitPacketInfo(filename string)
func NewProcessFactory ¶
func NewProcessFactory(env *Environment) func(string, *Host) *Process
func PIDNextFactory ¶
func PIDNextFactory() func() uint64
func ProcWrapper ¶
func ProcWrapper(processStrategy BaseBehaviourFunction, pi ProcessInterface, data interface{})
func ProcWrapperTemp ¶
func RangeParser ¶
func SIM_get_clockFactory ¶
func SIM_get_clockFactory(env *Environment) func() float64
func SIM_launch_application ¶
func SIM_launch_application(FilePath string)
func SIM_platform_init ¶
func SIM_runFactory ¶
func SIM_runFactory(env *Environment) func(float64)
func UnitToFloatFactory ¶
Types ¶
type AnomalyFlags ¶
type BaseBehaviourFunction ¶
type BaseBehaviourFunction func(ProcessInterface, interface{})
type BlockParams ¶
type BlockParams struct { // Storage RateTime *NormalParam `json:"rate_time"` SeekTime *NormalParam `json:"seek_time"` OverheadsTime *NormalParam `json:"overheads_time"` }
type ClientFlags ¶
type CommonPacketInfo ¶
type CommonPacketInfo struct { Size float64 `json:"size"` Index int `json:"-"` // Network TransmissionTime *NormalParam `json:"transmission_time"` LatencyTime *NormalParam `json:"latency_time"` ReadProcessingTime *NormalParam `json:"read_processing_time"` WriteProcessingTime *NormalParam `json:"write_processing_time"` RecoveryTime *NormalParam `json:"recovery_time"` RandReadParams *BlockParams `json:"rand_read"` RandWriteParams *BlockParams `json:"rand_write"` SeqReadParams *BlockParams `json:"seq_read"` SeqWriteParams *BlockParams `json:"seq_write"` ReadWriteParams *BlockParams `json:"read_write"` // contains filtered or unexported fields }
type ControllerParams ¶
type ControllerParams struct { ProcessingTime *NormalParam `json:"processing_time"` RecoveryTime *NormalParam `json:"recovery_time"` }
type CoreManager ¶
type CoreManager struct {
// contains filtered or unexported fields
}
func NewCoreManager ¶
func NewCoreManager(start uint64, end uint64, speed float64, state float64) *CoreManager
func (*CoreManager) Next ¶
func (cid *CoreManager) Next() *Core
type DeepControllerFlags ¶
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func NewEnvironment() *Environment
func (*Environment) GetGlobalQueue ¶
func (env *Environment) GetGlobalQueue() *globalEventQueue
func (*Environment) GetStepEnd ¶
func (env *Environment) GetStepEnd() chan interface{}
func (*Environment) SendResumeSignalToWorkers ¶
func (env *Environment) SendResumeSignalToWorkers()
func (*Environment) Step ¶
func (env *Environment) Step()
type EventQueue ¶
type EventQueue []*Event
func (EventQueue) Len ¶
func (eq EventQueue) Len() int
func (EventQueue) Less ¶
func (eq EventQueue) Less(i, j int) bool
func (*EventQueue) Pop ¶
func (eq *EventQueue) Pop() interface{}
func (*EventQueue) Push ¶
func (eq *EventQueue) Push(e interface{})
func (EventQueue) Swap ¶
func (eq EventQueue) Swap(i, j int)
type File ¶
type Host ¶
type Host struct { Name string Type string Id string Speed float64 // contains filtered or unexported fields }
func (*Host) GetAmountOfTasks ¶
func (*Host) GetDevTemp ¶
type Link ¶
type Link struct { Name string Bandwidth float64 Latency float64 State float64 Src, Dst *Host // contains filtered or unexported fields }
func (*Link) GetQueueSize ¶
type MachineInterface ¶
type MachineInterface interface { }
type NetworkPacket ¶
type NetworkPacket int
type NetworkParams ¶
type NetworkParams struct { TransmissionTime *NormalParam `json:"transmission_time"` LatencyTime *NormalParam `json:"latency_time"` }
type NormalParam ¶
type Packet ¶
type Packet struct { Type RequestType `json:"-"` Index int `json:"-"` Size float64 `json:"size"` NetworkTime *NetworkParams `json:"transmission_time"` ContrTime *ControllerParams `json:"recovery_time"` DiskParams *BlockParams `json:"disk_params"` }
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func (*Process) DetachedSendPacket ¶
func (*Process) GetEnv ¶
func (process *Process) GetEnv() *Environment
func (*Process) GetResumeChan ¶
func (*Process) ReceivePacket ¶
func (*Process) RecoveryExecutePacket ¶
func (*Process) SendPacket ¶
"component_filename"
func (*Process) SendToHostWithoutReceive ¶
func (*Process) WriteAsync ¶
type ProcessInterface ¶
func SIM_subprocess_create_async ¶
func SIM_subprocess_create_async(name string, f BaseBehaviourFunction, host *Host, pi ProcessInterface, data interface{}) ProcessInterface
func SIM_subprocess_create_sync ¶
func SIM_subprocess_create_sync(name string, f BaseBehaviourFunction, host *Host, pi ProcessInterface, data interface{}) ProcessInterface
type Storage ¶
type Storage struct { *StorageType Name string ID string Type string JBOD *JBOD BlockSize BLOCKSIZE ReadLink *Link WriteLink *Link // contains filtered or unexported fields }
func NewStorage ¶
func NewStorage(storageType *StorageType, name string, jbod *JBOD) *Storage
type StoragePacket ¶
type StoragePacket int
type StorageType ¶
type SystemFlags ¶
type SystemFlags struct { PlatformFileName string PacketFileName string AtmControlFileName string AtmDependenciesFileName string ClientFileName string NumJobsFileName string SimRun float64 NDisks int NumJobs int WriteClientFlags *ClientFlags ReadClientFlags *ClientFlags AnomalyFlags *AnomalyFlags TracerFlags *TracerFlags DCFlags *DeepControllerFlags }
func InitFlags ¶
func InitFlags(sf *SystemFlags) *SystemFlags
func NewSystemFlags ¶
func NewSystemFlags() *SystemFlags
func ParseFlags ¶
func ParseFlags(sf *SystemFlags) *SystemFlags
type TracerFlags ¶
type TracerFlags struct {
OutputFileName string
}
type Volume ¶
type Volume struct { Id string `xml:"id,attr"` Mounts []VolumePart `xml:"mount"` }
type VolumePart ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.