scans

package
v0.0.0-...-f2d3015 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2022 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const ViterbiGranularity = time.Millisecond * 50

Variables

This section is empty.

Functions

func CalcStats

func CalcStats(summary *ReqIntervalScan)

func IndivViterbiRender

func IndivViterbiRender(state viterbi.IndivHiddenState) (c color.RGBA, label string)

func MaxDuration

func MaxDuration(durations []time.Duration) time.Duration

func MeanDuration

func MeanDuration(durations []time.Duration) time.Duration

func MinDuration

func MinDuration(durations []time.Duration) time.Duration

func ScanReqSummaryViterbi

func ScanReqSummaryViterbi(path string) ([]ScannedLine, ViterbiStats, error)

func ShouldMerge

func ShouldMerge(first, second ReqInterval) bool

func TotalDuration

func TotalDuration(durations []time.Duration) time.Duration

func ViterbiRender

func ViterbiRender(state viterbi.HiddenState) (c color.RGBA, label string)

Types

type DebugLogCorruption

type DebugLogCorruption struct {
	Start model.VirtualTime
	End   model.VirtualTime
}

type DebugLogScan

type DebugLogScan struct {
	Level       readlog.LogLevel
	StableID    string
	Messages    []model.VirtualTime
	Corruptions []DebugLogCorruption
}

func ScanDebugLog

func ScanDebugLog(path string, elfPaths []string) ([]*DebugLogScan, error)

func (*DebugLogScan) BuildPlot

func (i *DebugLogScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*DebugLogScan) Label

func (i *DebugLogScan) Label() string

func (*DebugLogScan) LastTime

func (i *DebugLogScan) LastTime() float64

type IORec

type IORec struct {
	Timestamp model.VirtualTime
	Body      []byte
}

type IORecords

type IORecords struct {
	Name    string
	Records []IORec
}

func ScanIORecord

func ScanIORecord(path string) ([]*IORecords, error)

func (*IORecords) BuildPlot

func (i *IORecords) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*IORecords) Label

func (i *IORecords) Label() string

func (*IORecords) LastTime

func (i *IORecords) LastTime() float64

type IOScan

type IOScan struct {
	Reads  []model.VirtualTime
	Writes []model.VirtualTime
}

func ScanIOLog

func ScanIOLog(path string) (*IOScan, error)

func (*IOScan) BuildPlot

func (i *IOScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*IOScan) Label

func (i *IOScan) Label() string

func (*IOScan) LastTime

func (i *IOScan) LastTime() float64

type InjectionScan

type InjectionScan struct {
	Injections []model.VirtualTime
}

func ScanInjections

func ScanInjections(path string) (*InjectionScan, error)

func (*InjectionScan) BuildPlot

func (i *InjectionScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*InjectionScan) Label

func (i *InjectionScan) Label() string

func (*InjectionScan) LastTime

func (i *InjectionScan) LastTime() float64

type Interval

type Interval struct {
	Start model.VirtualTime
	End   model.VirtualTime
}

type IntervalMode

type IntervalMode string
const (
	IntervalReliable     IntervalMode = "Reliable"
	IntervalIntermittent IntervalMode = "Intermittent"
	IntervalLimited      IntervalMode = "Limited" // only used for system status
	IntervalBroken       IntervalMode = "Broken"
)

func ComputeSystemStatus

func ComputeSystemStatus(states map[string]IntervalMode) (status IntervalMode)

func (IntervalMode) Color

func (i IntervalMode) Color() color.RGBA

func (IntervalMode) Label

func (i IntervalMode) Label() string

type ReqIndivViterbiInterval

type ReqIndivViterbiInterval struct {
	Mode  viterbi.IndivHiddenState
	Start model.VirtualTime
	End   model.VirtualTime
}

type ReqIndivViterbiIntervalScan

type ReqIndivViterbiIntervalScan struct {
	RequirementName string
	Intervals       []ReqIndivViterbiInterval
}

func IndividualViterbi

func IndividualViterbi(req *ReqScan, lastTime model.VirtualTime) *ReqIndivViterbiIntervalScan

func (*ReqIndivViterbiIntervalScan) BuildPlot

func (r *ReqIndivViterbiIntervalScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*ReqIndivViterbiIntervalScan) Label

func (*ReqIndivViterbiIntervalScan) LastTime

func (r *ReqIndivViterbiIntervalScan) LastTime() float64

type ReqInterval

type ReqInterval struct {
	Mode       IntervalMode
	Start      model.VirtualTime
	End        model.VirtualTime
	PointCount int
}

func AlignIntervals

func AlignIntervals(in []ReqInterval) (out []ReqInterval)

func Merge

func Merge(first, second ReqInterval) ReqInterval

func MergeIntervals

func MergeIntervals(in []ReqInterval) (out []ReqInterval)

func PreliminaryIntervals

func PreliminaryIntervals(successes []model.VirtualTime, failures []model.VirtualTime) (intervals []ReqInterval)

func (*ReqInterval) Duration

func (ri *ReqInterval) Duration() time.Duration

type ReqIntervalScan

type ReqIntervalScan struct {
	RequirementName string
	Intervals       []ReqInterval
}

func CollectiveSummary

func CollectiveSummary(raw []*ReqIntervalScan) *ReqIntervalScan

func ScanReqSummary

func ScanReqSummary(path string, details bool) ([]*ReqIntervalScan, error)

func Summarize

func Summarize(r *ReqScan) *ReqIntervalScan

func (*ReqIntervalScan) BuildPlot

func (r *ReqIntervalScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*ReqIntervalScan) Label

func (r *ReqIntervalScan) Label() string

func (*ReqIntervalScan) LastTime

func (r *ReqIntervalScan) LastTime() float64

type ReqScan

type ReqScan struct {
	RequirementName string
	Failures        []model.VirtualTime
	Successes       []model.VirtualTime
	Intervals       []Interval
}

func ScanRawReqs

func ScanRawReqs(path string) ([]*ReqScan, error)

func (*ReqScan) BuildPlot

func (rs *ReqScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*ReqScan) Label

func (rs *ReqScan) Label() string

func (*ReqScan) LastTime

func (rs *ReqScan) LastTime() float64

func (*ReqScan) LastTimeVT

func (rs *ReqScan) LastTimeVT() model.VirtualTime

type ReqViterbiInterval

type ReqViterbiInterval struct {
	Mode  viterbi.HiddenState
	Start model.VirtualTime
	End   model.VirtualTime
}

func (*ReqViterbiInterval) Duration

func (ri *ReqViterbiInterval) Duration() time.Duration

type ReqViterbiIntervalScan

type ReqViterbiIntervalScan struct {
	RequirementName string
	Intervals       []ReqViterbiInterval
}

func (*ReqViterbiIntervalScan) BuildPlot

func (r *ReqViterbiIntervalScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*ReqViterbiIntervalScan) Label

func (r *ReqViterbiIntervalScan) Label() string

func (*ReqViterbiIntervalScan) LastTime

func (r *ReqViterbiIntervalScan) LastTime() float64

type ScanEntry

type ScanEntry struct {
	RequirementName string
	Timestamp       model.VirtualTime
	NewMode         IntervalMode
}

func BuildScanEntries

func BuildScanEntries(rs *ReqIntervalScan) (out []ScanEntry)

type ScannedLine

type ScannedLine interface {
	Label() string
	LastTime() float64
	BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot
}

type SchedEntry

type SchedEntry struct {
	Timestamp model.VirtualTime
	EndTime   model.VirtualTime
	TaskName  string
	Priority  uint
}

type SchedScan

type SchedScan struct {
	Priority uint
	Entries  []SchedEntry
}

func ScanScheduler

func ScanScheduler(guestLogPath string) ([]*SchedScan, error)

func (*SchedScan) BuildPlot

func (rs *SchedScan) BuildPlot(lastTime float64, location float64) *tlplot.TimelinePlot

func (*SchedScan) Label

func (rs *SchedScan) Label() string

func (*SchedScan) LastTime

func (rs *SchedScan) LastTime() float64

type ViterbiStats

type ViterbiStats struct {
	MeanTimeToFailure   time.Duration
	MeanTimeToRecovery  time.Duration
	BestTimeToFailure   time.Duration
	BestTimeToRecovery  time.Duration
	WorstTimeToFailure  time.Duration
	WorstTimeToRecovery time.Duration
	OkPercent           float64
}

func CalcViterbiStats

func CalcViterbiStats(intervals []ReqViterbiInterval) ViterbiStats

func (ViterbiStats) Print

func (v ViterbiStats) Print()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL