Documentation ¶
Index ¶
- Variables
- func Init(c *KernelConfig)
- func Initialized() bool
- func OnInit(f func())
- func Start(parentCtx context.Context)
- func Started() bool
- func Stop()
- type Kernel
- type KernelBlock
- type KernelConfig
- type KernelMetrics
- func (m *KernelMetrics) ActualProcTime() float64
- func (m *KernelMetrics) ActualProcTimePercent() float64
- func (m *KernelMetrics) ActualProcTimePercents() []float64
- func (m *KernelMetrics) ActualProcTimes() []float64
- func (m *KernelMetrics) AddBlockTime() float64
- func (m *KernelMetrics) AddBlockTimes() []float64
- func (m *KernelMetrics) BlockQCount() float64
- func (m *KernelMetrics) BlockQCounts() []float64
- func (m *KernelMetrics) ComputedProcTime() float64
- func (m *KernelMetrics) ComputedProcTimePercent() float64
- func (m *KernelMetrics) ComputedProcTimePercents() []float64
- func (m *KernelMetrics) ComputedProcTimes() []float64
- func (m *KernelMetrics) ConfBlockTime() float64
- func (m *KernelMetrics) ConfBlockTimes() []float64
- func (m *KernelMetrics) CycleTime() float64
- func (m *KernelMetrics) CycleTimes() []float64
- func (m *KernelMetrics) EvalTime() float64
- func (m *KernelMetrics) EvalTimes() []float64
- func (m *KernelMetrics) GenBlockTime() float64
- func (m *KernelMetrics) GenBlockTimes() []float64
- func (m *KernelMetrics) JSON() (string, error)
- func (m *KernelMetrics) MaintTime() float64
- func (m *KernelMetrics) MaintTimePercent() float64
- func (m *KernelMetrics) MaintTimePercents() []float64
- func (m *KernelMetrics) MaintTimes() []float64
- func (m *KernelMetrics) RecvQCount(name string) float64
- func (m *KernelMetrics) RecvQCountMap() map[string]float64
- func (m *KernelMetrics) RecvQCounts(name string) []float64
- func (m *KernelMetrics) RecvQCountsMap() map[string][]float64
- func (m *KernelMetrics) String() string
- type KernelMetricsJSON
- type KernelNet
- type KernelProc
- type KernelTime
- type MessageChannel
- type Process
- type RPC
Constants ¶
This section is empty.
Variables ¶
View Source
var SMAWindows = []int{10, 100, 1000, 10000, 100000, 1000000}
Functions ¶
func Init ¶
func Init(c *KernelConfig)
func Initialized ¶
func Initialized() bool
Types ¶
type KernelBlock ¶
type KernelBlock struct {
// contains filtered or unexported fields
}
func Block ¶
func Block() *KernelBlock
func (*KernelBlock) BlockNumber ¶
func (b *KernelBlock) BlockNumber() uint64
type KernelConfig ¶
type KernelConfig struct { Blockchain spec.Blockchain Consensus spec.Consensus // BlockRate is expressed in units of blocks per second. BlockFrequency float64 BlockPrototype spec.Marshalled NetworkNode spec.NetworkNode }
type KernelMetrics ¶
type KernelMetrics struct {
// contains filtered or unexported fields
}
func Metrics ¶
func Metrics() *KernelMetrics
func (*KernelMetrics) ActualProcTime ¶
func (m *KernelMetrics) ActualProcTime() float64
func (*KernelMetrics) ActualProcTimePercent ¶
func (m *KernelMetrics) ActualProcTimePercent() float64
func (*KernelMetrics) ActualProcTimePercents ¶
func (m *KernelMetrics) ActualProcTimePercents() []float64
func (*KernelMetrics) ActualProcTimes ¶
func (m *KernelMetrics) ActualProcTimes() []float64
func (*KernelMetrics) AddBlockTime ¶
func (m *KernelMetrics) AddBlockTime() float64
func (*KernelMetrics) AddBlockTimes ¶
func (m *KernelMetrics) AddBlockTimes() []float64
func (*KernelMetrics) BlockQCount ¶
func (m *KernelMetrics) BlockQCount() float64
func (*KernelMetrics) BlockQCounts ¶
func (m *KernelMetrics) BlockQCounts() []float64
func (*KernelMetrics) ComputedProcTime ¶
func (m *KernelMetrics) ComputedProcTime() float64
func (*KernelMetrics) ComputedProcTimePercent ¶
func (m *KernelMetrics) ComputedProcTimePercent() float64
func (*KernelMetrics) ComputedProcTimePercents ¶
func (m *KernelMetrics) ComputedProcTimePercents() []float64
func (*KernelMetrics) ComputedProcTimes ¶
func (m *KernelMetrics) ComputedProcTimes() []float64
func (*KernelMetrics) ConfBlockTime ¶
func (m *KernelMetrics) ConfBlockTime() float64
func (*KernelMetrics) ConfBlockTimes ¶
func (m *KernelMetrics) ConfBlockTimes() []float64
func (*KernelMetrics) CycleTime ¶
func (m *KernelMetrics) CycleTime() float64
func (*KernelMetrics) CycleTimes ¶
func (m *KernelMetrics) CycleTimes() []float64
func (*KernelMetrics) EvalTime ¶
func (m *KernelMetrics) EvalTime() float64
func (*KernelMetrics) EvalTimes ¶
func (m *KernelMetrics) EvalTimes() []float64
func (*KernelMetrics) GenBlockTime ¶
func (m *KernelMetrics) GenBlockTime() float64
func (*KernelMetrics) GenBlockTimes ¶
func (m *KernelMetrics) GenBlockTimes() []float64
func (*KernelMetrics) JSON ¶
func (m *KernelMetrics) JSON() (string, error)
func (*KernelMetrics) MaintTime ¶
func (m *KernelMetrics) MaintTime() float64
func (*KernelMetrics) MaintTimePercent ¶
func (m *KernelMetrics) MaintTimePercent() float64
func (*KernelMetrics) MaintTimePercents ¶
func (m *KernelMetrics) MaintTimePercents() []float64
func (*KernelMetrics) MaintTimes ¶
func (m *KernelMetrics) MaintTimes() []float64
func (*KernelMetrics) RecvQCount ¶
func (m *KernelMetrics) RecvQCount(name string) float64
func (*KernelMetrics) RecvQCountMap ¶
func (m *KernelMetrics) RecvQCountMap() map[string]float64
func (*KernelMetrics) RecvQCounts ¶
func (m *KernelMetrics) RecvQCounts(name string) []float64
func (*KernelMetrics) RecvQCountsMap ¶
func (m *KernelMetrics) RecvQCountsMap() map[string][]float64
func (*KernelMetrics) String ¶
func (m *KernelMetrics) String() string
type KernelMetricsJSON ¶
type KernelMetricsJSON struct { KernelTime string `json:"kernelTime"` Uptime time.Duration `json:"uptime"` MovingAverageWindows []int `json:"movingAverageWindows"` BlockQueueCount float64 `json:"blockQueueCount"` BlockQueueCounts []float64 `json:"blockQueueCounts"` ReceiveQueueCount map[string]float64 `json:"receiveQueueCount"` ReceiveQueueCounts map[string][]float64 `json:"receiveQueueCounts"` CycleNumber uint64 `json:"cycleNumber,string"` ConfiguredCycleTime time.Duration `json:"configuredCycleTime"` ConfiguredBlockFrequency float64 `json:"configuredBlockFrequency"` ActualCycleTime float64 `json:"actualCycleTime"` ActualCycleTimes []float64 `json:"actualCycleTimes"` ProcessTimeslice float64 `json:"processTimeslice"` ProcessTimeslices []float64 `json:"processTimeslices"` ProcessTimeslicePercent float64 `json:"processTimeslicePercent"` ProcessTimeslicePercents []float64 `json:"processTimeslicePercents"` ScheduledProcessTimeslice float64 `json:"scheduleProcessTimeslice"` ScheduledProcessTimeslices []float64 `json:"scheduledProcessTimeslices"` ScheduledProcessTimeslicePercent float64 `json:"scheduledProcessTimeslicePercent"` ScheduledProcessTimeslicePercents []float64 `json:"scheduledProcessTimeslicePercents"` BlockGenerationNumber uint64 `json:"blockGenerationNumber,string"` BlockGenerationTime float64 `json:"blockGenerationTime"` BlockGenerationTimes []float64 `json:"blockGenerationTimes"` BlockAddPerformance float64 `json:"blockAddPerformance"` BlockAddPerformances []float64 `json:"blockAddPerformances"` MaintenanceTimeslice float64 `json:"maintenanceTimeslice"` MaintenanceTimeslices []float64 `json:"maintenanceTimeslices"` MaintenanceTimeslicePercent float64 `json:"maintenanceTimeslicePercent"` MaintenanceTimeslicePercents []float64 `json:"maintenanceTimeslicePercents"` BlockConfirmationTime float64 `json:"blockConfirmationTime"` BlockConfirmationTimes []float64 `json:"blockConfirmationTimes"` HeadBlockEvaluationTime float64 `json:"headBlockEvaluationTime"` HeadBlockEvaluationTimes []float64 `json:"headBlockEvaluationTimes"` }
type KernelNet ¶
type KernelNet struct {
// contains filtered or unexported fields
}
func (*KernelNet) RegisterMessageChannel ¶
func (n *KernelNet) RegisterMessageChannel(channel *MessageChannel)
type KernelProc ¶
type KernelProc struct {
// contains filtered or unexported fields
}
func Proc ¶
func Proc() *KernelProc
func (*KernelProc) IsScheduled ¶
func (p *KernelProc) IsScheduled(pid uint) bool
func (*KernelProc) Kill ¶
func (p *KernelProc) Kill(pid uint)
func (*KernelProc) Schedule ¶
func (p *KernelProc) Schedule(process Process) (pid uint)
type KernelTime ¶
type KernelTime struct {
// contains filtered or unexported fields
}
func Time ¶
func Time() *KernelTime
func (*KernelTime) BlockFrequency ¶
func (t *KernelTime) BlockFrequency() float64
func (*KernelTime) BlockInterval ¶
func (t *KernelTime) BlockInterval() time.Duration
func (*KernelTime) CycleNumber ¶
func (t *KernelTime) CycleNumber() uint64
func (*KernelTime) Nanos ¶
func (t *KernelTime) Nanos() int64
func (*KernelTime) String ¶
func (t *KernelTime) String() string
func (*KernelTime) UpTime ¶
func (t *KernelTime) UpTime() time.Duration
type MessageChannel ¶
type MessageChannel struct { Prototype spec.Marshalled Protocol *spec.MessageProtocol ReceiveHandler spec.MessageReceiver }
func NewMessageChannel ¶
func NewMessageChannel(prototype spec.Marshalled, receiveHandler spec.MessageReceiver) *MessageChannel
type RPC ¶
type RPC struct { }
func (*RPC) GetMetrics ¶
func (h *RPC) GetMetrics(r *http.Request, args *rpcclient.GetMetricsArgs, reply *rpcclient.GetMetricsReply) error
Click to show internal directories.
Click to hide internal directories.