Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
Source int `json:"source"`
Target int `json:"target"`
Label string `json:"label"`
Latency int `json:"latency"`
BandwidthLimit int `json:"bandwidthLimit"`
PipelineStages []PipelineStage `json:"pipelineStages,omitempty"`
// Backpressure signal
Backpressured bool `json:"backpressured"` // IsBackpressured()
}
Edge represents a link between two nodes and its pipeline state.
type Frame ¶
type Frame struct {
Cycle int `json:"cycle"`
Paused bool `json:"paused"`
InFlightCount int `json:"inFlightCount"`
ConfigHash string `json:"configHash"`
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
Stats *Stats `json:"stats,omitempty"`
}
Frame represents a snapshot emitted each simulation cycle for visualization.
type GlobalStats ¶
type GlobalStats struct {
TotalRequests int `json:"TotalRequests"`
Completed int `json:"Completed"`
CompletionRate float64 `json:"CompletionRate"`
AvgEndToEndDelay float64 `json:"AvgEndToEndDelay"`
MaxDelay int `json:"MaxDelay"`
MinDelay int `json:"MinDelay"`
}
GlobalStats mirrors the current implementation in the front-end.
type MasterStats ¶
type MasterStats struct {
CompletedRequests int `json:"CompletedRequests"`
AvgDelay float64 `json:"AvgDelay"`
MaxDelay int `json:"MaxDelay"`
MinDelay int `json:"MinDelay"`
}
MasterStats contains per-master metrics.
type Node ¶
type Node struct {
ID int `json:"id"`
Label string `json:"label"`
Type string `json:"type"`
Queues []Queue `json:"queues,omitempty"`
Payload map[string]any `json:"payload,omitempty"`
Capabilities []string `json:"capabilities,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
// Backpressure signals
InQueueBackpressure bool `json:"inQueueBackpressure"` // IsInQueueFull()
OutQueueBackpressure bool `json:"outQueueBackpressure"` // IsOutQueueFull()
DownstreamBackpressure bool `json:"downstreamBackpressure"` // GetDownstreamBackpressure()
}
Node describes a single vertex in the topology graph.
type PacketEntry ¶
type PacketEntry struct {
ID int `json:"id"`
Type string `json:"type"`
SrcID int `json:"srcID"`
DstID int `json:"dstID"`
TransactionType string `json:"transactionType"`
MessageType string `json:"messageType"`
}
PacketEntry captures lightweight packet metadata required by the UI.
type PipelineStage ¶
type PipelineStage struct {
StageIndex int `json:"stageIndex"`
PacketCount int `json:"packetCount"`
}
PipelineStage expresses the occupancy for a latency stage.
type Queue ¶
type Queue struct {
Name string `json:"name"`
Length int `json:"length"`
Capacity int `json:"capacity"`
Packets []PacketEntry `json:"packets,omitempty"`
}
Queue communicates per-node queue depth for Flow View overlays.
type SlaveStats ¶
type SlaveStats struct {
TotalProcessed int `json:"TotalProcessed"`
MaxQueueLength int `json:"MaxQueueLength"`
AvgQueueLength float64 `json:"AvgQueueLength"`
}
SlaveStats contains per-slave metrics.
type Stats ¶
type Stats struct {
Global *GlobalStats `json:"Global,omitempty"`
PerMaster []MasterStats `json:"PerMaster,omitempty"`
PerSlave []SlaveStats `json:"PerSlave,omitempty"`
}
Stats aggregates simulator level metrics for the dashboard panels.
Click to show internal directories.
Click to hide internal directories.