Documentation ¶
Overview ¶
Created by kenenbek on 18.12.17.
Created by kenenbek on 16.12.17.
Created by kenenbek on 16.12.17.
Index ¶
- func DiskReaderExecutor(TP *SANProcess, data interface{})
- func FORK(name string, f SANBFunction, host *lib.Host, data interface{})
- func PIDecorator(function SANBFunction) lib.BaseBehaviourFunction
- func ParseFileAndUnmarshal(filename string) []byte
- func SimParallelization(filename string) map[int]float64
- func StartSimulation(flags *lib.SystemFlags)
- type ClientManager
- func (CL *ClientManager) DecreaseIOCNT()
- func (CL *ClientManager) IOBalancerReadCounterProcess(TP *SANProcess, _ interface{})
- func (CL *ClientManager) IOBalancerWriteCounterProcess(TP *SANProcess, _ interface{})
- func (CL *ClientManager) PacketSenderReceiverProcess(TP *SANProcess, data interface{})
- func (CL *ClientManager) ReceivePacket(TP *SANProcess, info *FileInfo) lib.STATUS
- func (CL *ClientManager) SendPacket(TP *SANProcess, info *FileInfo) lib.STATUS
- func (CL *ClientManager) Tracer(TP *SANProcess, _ interface{})
- func (CL *ClientManager) WriteProcessRestart(fileInfo *FileInfo)
- type CommonProps
- type Controller
- func (controller *Controller) ExecutePacket(TP *SANProcess, packet *lib.Packet, fi *FileInfo) lib.STATUS
- func (controller *Controller) ReceivePacket(TP *SANProcess, address string) (*lib.Packet, lib.STATUS)
- func (controller *Controller) ResetDiffValues()
- func (controller *Controller) SendPacket(TP *SANProcess, packet *lib.Packet, address string) lib.STATUS
- func (controller *Controller) ServerExecutor(TP *SANProcess, data interface{})
- type ControllerProps
- type DiskState
- type FileInfo
- type FileMetric
- type IOBalancer
- func (iob *IOBalancer) AddWorkingController(controller *Controller)
- func (iob *IOBalancer) CreateSANExecutors(file *lib.File) *FileInfo
- func (iob *IOBalancer) CreateSANReaderExecutors(file *lib.File) *FileInfo
- func (iob *IOBalancer) CreateSANWriterExecutors(file *lib.File) *FileInfo
- func (iob *IOBalancer) GetControllerById(conId string) *Controller
- func (iob *IOBalancer) GetDiskById(diskId string) *SANDisk
- func (iob *IOBalancer) GetJbodConById(jbodId string) *SANJBODController
- func (iob *IOBalancer) GetLinkById(linkId string) *SANLink
- func (iob *IOBalancer) GetWorkingComponents() (*Controller, *SANJBODController)
- func (iob *IOBalancer) GetWorkingController() *Controller
- func (iob *IOBalancer) GetWorkingJBOD() *SANJBODController
- func (iob *IOBalancer) IOBalancerProcessManager(TP *SANProcess, data interface{})
- func (iob *IOBalancer) RemoveWorkingController(index int)
- func (iob *IOBalancer) ResetDiffValues()
- func (iob *IOBalancer) SANComponentsPreparation(file *lib.File) (*FileInfo, *Controller, *SANJBODController)
- type IOBalancerFManager
- type IOBalancerProps
- type LogJson
- type Master
- type Mock
- type NamingProps
- type SAN
- func (t *SAN) GetClientManager() *ClientManager
- func (t *SAN) GetControllers() []*Controller
- func (t *SAN) GetDeepControllerManager() *deepcontroller.Manager
- func (t *SAN) GetIoBalancer() *IOBalancer
- func (t *SAN) GetJsonLog() *LogJson
- func (t *SAN) GetSANJBODControllers() []*SANJBODController
- func (t *SAN) Read()
- func (t *SAN) Save()
- func (t *SAN) Write()
- type SANBFunction
- type SANBuilder
- type SANComponent
- type SANDisk
- func (disk *SANDisk) DiskWriterManagerProcess(TP *SANProcess, data interface{})
- func (disk *SANDisk) MetricRead(packet *lib.Packet)
- func (disk *SANDisk) MetricWrite(packet *lib.Packet)
- func (disk *SANDisk) ReadAsync(TP *SANProcess, packet *lib.Packet) (*lib.Packet, lib.STATUS)
- func (disk *SANDisk) ReadSync(TP *SANProcess, packet *lib.Packet) (*lib.Packet, lib.STATUS)
- func (disk *SANDisk) ResetDiffValues()
- func (disk *SANDisk) WriteAsync(TP *SANProcess, packet *lib.Packet) lib.STATUS
- func (disk *SANDisk) WriteSync(TP *SANProcess, packet *lib.Packet) lib.STATUS
- type SANJBODController
- func (tjc *SANJBODController) GetDisks() []*SANDisk
- func (jbod *SANJBODController) GetPacketLocation(packet *lib.Packet) *SANDisk
- func (tjc *SANJBODController) GetWorkingDisk() *SANDisk
- func (jbod *SANJBODController) JbodReaderProcess(TP *SANProcess, data interface{})
- func (jbod *SANJBODController) JbodWriterProcess(TP *SANProcess, data interface{})
- type SANLink
- type SANProcess
- type SANVolume
- type SHD
- type StorageProperties
- type TraceAble
- type TracerManager
- func (tracer *TracerManager) AtmosphereTracer()
- func (tracer *TracerManager) Close()
- func (tracer *TracerManager) CloseOutputFile()
- func (tracer *TracerManager) ControllersTracer()
- func (tracer *TracerManager) CreateOutputFile(flagsData *lib.TracerFlags)
- func (tracer *TracerManager) DiskDriveTracer()
- func (tracer *TracerManager) IOBalancerTracer()
- func (tracer *TracerManager) PrepareJSONBytes() []byte
- func (tracer *TracerManager) ResetValues()
- func (tracer *TracerManager) TracerManagerProcess(TP *SANProcess, data interface{})
- func (tracer *TracerManager) UpdateLogJSON()
- func (tracer *TracerManager) VolumeTracer()
- func (tracer *TracerManager) WriteToOutputFile(jsonBytes []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DiskReaderExecutor ¶
func DiskReaderExecutor(TP *SANProcess, data interface{})
func PIDecorator ¶
func PIDecorator(function SANBFunction) lib.BaseBehaviourFunction
func ParseFileAndUnmarshal ¶
func SimParallelization ¶
func StartSimulation ¶
func StartSimulation(flags *lib.SystemFlags)
Types ¶
type ClientManager ¶
type ClientManager struct { *lib.Host `json:"-"` Cap float64 `json:"cap"` // contains filtered or unexported fields }
func NewClientManager ¶
func NewClientManager(host *lib.Host, iob *IOBalancer, id string, capacity float64, parMap map[int]float64) *ClientManager
func (*ClientManager) DecreaseIOCNT ¶
func (CL *ClientManager) DecreaseIOCNT()
func (*ClientManager) IOBalancerReadCounterProcess ¶
func (CL *ClientManager) IOBalancerReadCounterProcess(TP *SANProcess, _ interface{})
func (*ClientManager) IOBalancerWriteCounterProcess ¶
func (CL *ClientManager) IOBalancerWriteCounterProcess(TP *SANProcess, _ interface{})
func (*ClientManager) PacketSenderReceiverProcess ¶
func (CL *ClientManager) PacketSenderReceiverProcess(TP *SANProcess, data interface{})
func (*ClientManager) ReceivePacket ¶
func (CL *ClientManager) ReceivePacket(TP *SANProcess, info *FileInfo) lib.STATUS
func (*ClientManager) SendPacket ¶
func (CL *ClientManager) SendPacket(TP *SANProcess, info *FileInfo) lib.STATUS
func (*ClientManager) Tracer ¶
func (CL *ClientManager) Tracer(TP *SANProcess, _ interface{})
func (*ClientManager) WriteProcessRestart ¶
func (CL *ClientManager) WriteProcessRestart(fileInfo *FileInfo)
type CommonProps ¶
type CommonProps struct { Status anomaly.ComponentStatus `json:"health"` DevTemp float64 `json:"dev_temp"` Uptime float64 `json:"uptime"` }
type Controller ¶
type Controller struct { *Mock *NamingProps *ControllerProps `json:"props"` *lib.Host `json:"-"` *SANComponent `json:"-"` // contains filtered or unexported fields }
func NewController ¶
func NewController(host *lib.Host) *Controller
func (*Controller) ExecutePacket ¶
func (controller *Controller) ExecutePacket(TP *SANProcess, packet *lib.Packet, fi *FileInfo) lib.STATUS
func (*Controller) ReceivePacket ¶
func (controller *Controller) ReceivePacket(TP *SANProcess, address string) (*lib.Packet, lib.STATUS)
func (*Controller) ResetDiffValues ¶
func (controller *Controller) ResetDiffValues()
func (*Controller) SendPacket ¶
func (controller *Controller) SendPacket(TP *SANProcess, packet *lib.Packet, address string) lib.STATUS
func (*Controller) ServerExecutor ¶
func (controller *Controller) ServerExecutor(TP *SANProcess, data interface{})
type ControllerProps ¶
type ControllerProps struct { *CommonProps LastTime float64 `json:"-"` TrafficDif float64 `json:"traffic"` TrafficCum float64 `json:"-"` InputTrafficDif float64 `json:"-"` OutputTrafficDif float64 `json:"-"` InputTrafficCum float64 `json:"-"` OutputTrafficCum float64 `json:"-"` FlopsExecutedDiff float64 `json:"load"` FlopsExecutedCum float64 `json:"-"` }
type DiskState ¶
type DiskState struct { Pool string `json:"pool"` TotalSpace uint64 `json:"total_cap_MB"` // TODO UsedSpace uint64 `json:"used_cap_MB"` // TODO AllocMB uint64 `json:"alloc_MB"` // TODO LenMB uint64 `json:"len_MB"` // TODO Status string `json:"status"` // TODO State string `json:"state"` // TODO AvgReadSpeed float64 `json:"r_KBps"` // TODO `json:"avg_read_speed"` AvgWriteSpeed float64 `json:"w_KBps"` // TODO `json:"avg_write_speed"` ReadOps float64 `json:"r_ops"` WriteOps float64 `json:"w_ops"` ReadAwaitMs float64 `json:"r_await_ms"` WriteAwaitMs float64 `json:"w_await_ms"` Crrm float64 `json:"crrm"` // TODO Rrqm float64 `json:"rrqm"` // TODO Wrqm float64 `json:"wrqm"` // TODO Avgrq_sz float64 `json:"avgrq_sz"` // TODO NZ Avgqu_sz float64 `json:"avgqu_sz"` // TODO NZ MBRead float64 `json:"MB_read"` MBWrtn float64 `json:"MB_wrtn"` IORead [10]float64 `json:"blk_read"` IOWrite [10]float64 `json:"blk_write"` // unnecessary Async float64 `json:"async"` Crrq float64 `json:"crrq"` AvgQsz float64 `json:"avg_qsz"` SvctmMs float64 `json:"svctm_ms"` }
func NewDiskState ¶
func NewDiskState() *DiskState
func (*DiskState) ResetDiffValues ¶
func (ds *DiskState) ResetDiffValues()
type FileInfo ¶
func NewFileInfo ¶
func NewFileInfo(file *lib.File, con *Controller, jbod *SANJBODController) *FileInfo
type FileMetric ¶
type FileMetric struct {
// contains filtered or unexported fields
}
type IOBalancer ¶
type IOBalancer struct { *NamingProps *IOBalancerProps `json:"props"` *lib.Host `json:"-"` *SANComponent `json:"-"` GlobalDiskState *DiskState `json:"-"` Controllers []*Controller `json:"-"` Jbods []*SANJBODController `json:"-"` FailManager *AtmosphereFailManager `json:"-"` // contains filtered or unexported fields }
func NewIOBalancer ¶
func NewIOBalancer(host *lib.Host, cons []*Controller, jbods []*SANJBODController) *IOBalancer
func (*IOBalancer) AddWorkingController ¶
func (iob *IOBalancer) AddWorkingController(controller *Controller)
func (*IOBalancer) CreateSANExecutors ¶
func (iob *IOBalancer) CreateSANExecutors(file *lib.File) *FileInfo
func (*IOBalancer) CreateSANReaderExecutors ¶
func (iob *IOBalancer) CreateSANReaderExecutors(file *lib.File) *FileInfo
func (*IOBalancer) CreateSANWriterExecutors ¶
func (iob *IOBalancer) CreateSANWriterExecutors(file *lib.File) *FileInfo
func (*IOBalancer) GetControllerById ¶
func (iob *IOBalancer) GetControllerById(conId string) *Controller
func (*IOBalancer) GetDiskById ¶
func (iob *IOBalancer) GetDiskById(diskId string) *SANDisk
func (*IOBalancer) GetJbodConById ¶
func (iob *IOBalancer) GetJbodConById(jbodId string) *SANJBODController
func (*IOBalancer) GetLinkById ¶
func (iob *IOBalancer) GetLinkById(linkId string) *SANLink
func (*IOBalancer) GetWorkingComponents ¶
func (iob *IOBalancer) GetWorkingComponents() (*Controller, *SANJBODController)
func (*IOBalancer) GetWorkingController ¶
func (iob *IOBalancer) GetWorkingController() *Controller
func (*IOBalancer) GetWorkingJBOD ¶
func (iob *IOBalancer) GetWorkingJBOD() *SANJBODController
func (*IOBalancer) IOBalancerProcessManager ¶
func (iob *IOBalancer) IOBalancerProcessManager(TP *SANProcess, data interface{})
func (*IOBalancer) RemoveWorkingController ¶
func (iob *IOBalancer) RemoveWorkingController(index int)
func (*IOBalancer) ResetDiffValues ¶
func (iob *IOBalancer) ResetDiffValues()
func (*IOBalancer) SANComponentsPreparation ¶
func (iob *IOBalancer) SANComponentsPreparation(file *lib.File) (*FileInfo, *Controller, *SANJBODController)
type IOBalancerFManager ¶
type IOBalancerFManager struct {
// contains filtered or unexported fields
}
type IOBalancerProps ¶
type IOBalancerProps struct { *CommonProps ReadResponseRate float64 `json:"read_response_rate"` WriteResponseRate float64 `json:"write_response_rate"` ReadRequestsRate float64 `json:"read_requests_rate"` WriteRequestsRate float64 `json:"write_requests_rate"` ReadDataVolume float64 `json:"read_data_volume"` WriteDataVolume float64 `json:"write_data_volume"` ReadRequestProcessTime float64 `json:"read_request_process_time"` WriteRequestProcessTime float64 `json:"write_request_process_time"` IoProcessingMethod uint8 `json:"io_processing_method"` ReadCancelRate float64 `json:"read_cancel_rate"` WriteCancelRate float64 `json:"write_cancel_rate"` BlockSize uint16 `json:"block_size"` IOProcessCnt uint8 `json:"io_process_cnt"` ReadQueueLength uint8 `json:"read_queue_length"` WriteQueueLength uint8 `json:"write_queue_length"` }
type LogJson ¶
type LogJson struct { Timestamp float64 `json:"timestamp"` Ambience *AtmosphereControl `json:"ambience"` StorageComponents []TraceAble `json:"storage_components"` StState *DiskState `json:"storage_state"` }
func CreateLogJSON ¶
func CreateLogJSON(hosts []TraceAble, jbods []*SANJBODController, ACM *AtmosphereControlManager) *LogJson
type Master ¶
func (*Master) ClientManagerAsyncProcess ¶
func (M *Master) ClientManagerAsyncProcess(TP *SANProcess, data interface{})
type NamingProps ¶
type NamingProps struct { Type string `json:"type"` Name string `json:"-"` ID string `json:"id"` Owner string `json:"owner"` }
func NewNamingProps ¶
func NewNamingProps(name, typeID, id string) *NamingProps
type SAN ¶
type SAN struct {
// contains filtered or unexported fields
}
func (*SAN) GetClientManager ¶
func (t *SAN) GetClientManager() *ClientManager
func (*SAN) GetControllers ¶
func (t *SAN) GetControllers() []*Controller
func (*SAN) GetDeepControllerManager ¶
func (t *SAN) GetDeepControllerManager() *deepcontroller.Manager
func (*SAN) GetIoBalancer ¶
func (t *SAN) GetIoBalancer() *IOBalancer
func (*SAN) GetJsonLog ¶
func (*SAN) GetSANJBODControllers ¶
func (t *SAN) GetSANJBODControllers() []*SANJBODController
type SANBFunction ¶
type SANBFunction func(*SANProcess, interface{})
type SANBuilder ¶
type SANBuilder interface { IOBalancer(*IOBalancer) SANBuilder Controllers([]*Controller) SANBuilder JbodControllers([]*SANJBODController) SANBuilder Client(*ClientManager) SANBuilder Tracer(*TracerManager) SANBuilder AtmosphereControl(*AtmosphereControlManager) SANBuilder Build() SHD }
func NewSAN ¶
func NewSAN() SANBuilder
type SANComponent ¶
type SANComponent struct {
// contains filtered or unexported fields
}
func (*SANComponent) GetCurrentState ¶
func (component *SANComponent) GetCurrentState() string
func (*SANComponent) SetCurrentState ¶
func (component *SANComponent) SetCurrentState(state string)
type SANDisk ¶
type SANDisk struct { *Mock *NamingProps *StorageProperties `json:"props"` *lib.Storage `json:"-"` *SANComponent `json:"-"` GlobalDiskState *DiskState `json:"-"` // contains filtered or unexported fields }
func NewSANDisk ¶
func NewSANDisk(libDisk *lib.Storage, jbod *SANJBODController) *SANDisk
func (*SANDisk) DiskWriterManagerProcess ¶
func (disk *SANDisk) DiskWriterManagerProcess(TP *SANProcess, data interface{})
func (*SANDisk) MetricRead ¶
func (*SANDisk) MetricWrite ¶
func (*SANDisk) ResetDiffValues ¶
func (disk *SANDisk) ResetDiffValues()
func (*SANDisk) WriteAsync ¶
type SANJBODController ¶
type SANJBODController struct { *lib.Host `json:"-"` *NamingProps `json:"-"` *CommonProps `json:"-"` *SANComponent `json:"-"` // contains filtered or unexported fields }
func NewSANJBODController ¶
func NewSANJBODController(libJBOD *lib.JBOD) *SANJBODController
JBOD name matches with the name of its controller
func (*SANJBODController) GetDisks ¶
func (tjc *SANJBODController) GetDisks() []*SANDisk
func (*SANJBODController) GetPacketLocation ¶
func (jbod *SANJBODController) GetPacketLocation(packet *lib.Packet) *SANDisk
func (*SANJBODController) GetWorkingDisk ¶
func (tjc *SANJBODController) GetWorkingDisk() *SANDisk
func (*SANJBODController) JbodReaderProcess ¶
func (jbod *SANJBODController) JbodReaderProcess(TP *SANProcess, data interface{})
func (*SANJBODController) JbodWriterProcess ¶
func (jbod *SANJBODController) JbodWriterProcess(TP *SANProcess, data interface{})
type SANLink ¶
type SANLink struct { *Mock *NamingProps *lib.Link `json:"-"` *SANComponent `json:"-"` // contains filtered or unexported fields }
type SANProcess ¶
func NewSANProcess ¶
func NewSANProcess() *SANProcess
func (*SANProcess) GetParent ¶
func (tp *SANProcess) GetParent() *lib.Process
func (*SANProcess) SendToHost ¶
func (TP *SANProcess) SendToHost(controller *Controller, packet *lib.Packet) lib.STATUS
func (*SANProcess) SetParent ¶
func (tp *SANProcess) SetParent(p *lib.Process)
type SANVolume ¶
type SANVolume struct { *NamingProps *StorageProperties `json:"props"` *SANComponent `json:"-"` // contains filtered or unexported fields }
func NewSANVolume ¶
func NewUnifiedLogicalVolume ¶
func NewUnifiedLogicalVolume(jbods []*SANJBODController) *SANVolume
func (*SANVolume) ResetDiffValues ¶
func (volume *SANVolume) ResetDiffValues()
type SHD ¶
type SHD interface { Read() Write() Save() GetControllers() []*Controller GetClientManager() *ClientManager GetIoBalancer() *IOBalancer GetSANJBODControllers() []*SANJBODController GetJsonLog() *LogJson GetDeepControllerManager() *deepcontroller.Manager }
func PlatformInit ¶
func PlatformInit(flags *lib.SystemFlags) SHD
type StorageProperties ¶
type StorageProperties struct { *CommonProps RawCapacity float64 `json:"cap_gb"` Type string `json:"type"` JBOD string `json:"jbod"` Pool string `json:"pool"` AvgReadSpeed float64 `json:"-"` // `json:"avg_read_speed"` AvgWriteSpeed float64 `json:"-"` // `json:"avg_write_speed"` DataInterfacesCnt uint16 `json:"-"` // `json:"data_interfaces_cnt"` UsedSpace float64 `json:"-"` // `json:"used_space"` FreeSpace float64 `json:"-"` // `json:"free_space"` }
type TracerManager ¶
type TracerManager struct { OutputFileWrite bool // contains filtered or unexported fields }
func NewTracerManager ¶
func NewTracerManager(iob *IOBalancer, acm *AtmosphereControlManager, cm *ClientManager) *TracerManager
func (*TracerManager) AtmosphereTracer ¶
func (tracer *TracerManager) AtmosphereTracer()
Atmosphere tracer
func (*TracerManager) Close ¶
func (tracer *TracerManager) Close()
func (*TracerManager) CloseOutputFile ¶
func (tracer *TracerManager) CloseOutputFile()
func (*TracerManager) ControllersTracer ¶
func (tracer *TracerManager) ControllersTracer()
func (*TracerManager) CreateOutputFile ¶
func (tracer *TracerManager) CreateOutputFile(flagsData *lib.TracerFlags)
func (*TracerManager) IOBalancerTracer ¶
func (tracer *TracerManager) IOBalancerTracer()
func (*TracerManager) PrepareJSONBytes ¶
func (tracer *TracerManager) PrepareJSONBytes() []byte
func (*TracerManager) ResetValues ¶
func (tracer *TracerManager) ResetValues()
func (*TracerManager) TracerManagerProcess ¶
func (tracer *TracerManager) TracerManagerProcess(TP *SANProcess, data interface{})
func (*TracerManager) UpdateLogJSON ¶
func (tracer *TracerManager) UpdateLogJSON()
func (*TracerManager) VolumeTracer ¶
func (tracer *TracerManager) VolumeTracer()
func (*TracerManager) WriteToOutputFile ¶
func (tracer *TracerManager) WriteToOutputFile(jsonBytes []byte)
Click to show internal directories.
Click to hide internal directories.