Documentation
¶
Index ¶
- func CompleteTiming() (err error)
- func FlushAndCleanUpResources()
- func ResumeTiming(toolName, outputFile string) error
- type EventType
- type TimeStamp
- func BeginTiming(toolName, outputFile string) (*TimeStamp, error)
- func PauseEvent(ts *TimeStamp) (*TimeStamp, error)
- func ResumeEvent(ts *TimeStamp) (*TimeStamp, error)
- func StartEvent(name string, parentTS *TimeStamp) (ts *TimeStamp, err error)
- func StartEventByPath(path string) (ts *TimeStamp, err error)
- func StopEvent(ts *TimeStamp) (*TimeStamp, error)
- func StopEventByPath(path string) (ts *TimeStamp, err error)
- type TimeStampManager
- type TimeStampReadManager
- type TimeStampRecord
- type TimeStampWriteManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompleteTiming ¶
func CompleteTiming() (err error)
Marks the end of collecting timing data. Perform any cleanup needed by the timestamp manager object
func FlushAndCleanUpResources ¶
func FlushAndCleanUpResources()
Close the event queue, wait for the processor to finish and flush the remaining buffered data to disk
func ResumeTiming ¶
Begins appending timing data for a high level component 'toolName' into the file at 'outputFile'
Types ¶
type TimeStamp ¶
type TimeStamp struct { ID int64 `json:"ID"` // Unique ID for timestamp object Name string `json:"Name"` // Name of the step StartTime *time.Time `json:"StartTime"` // Start time of the step EndTime *time.Time `json:"EndTime"` // End time of the step ElapsedSeconds float64 `json:"ElapsedSeconds"` // Total elapsed time in seconds ParentID int64 `json:"ParentID"` // ID of the parent step // contains filtered or unexported fields }
func BeginTiming ¶
Begins collecting timing data for a high level component 'toolName' into the file at 'outputFile'
func StartEvent ¶
Add an event that marks the start of a timestamped step, if parentTS is nil, use lastVisited as parentTS
func StartEventByPath ¶
Add an event that marks the start of a timestamped step using full name
func StopEvent ¶
Add an event that marks the end of a timestamped step, if ts is nil, use lastVisited as ts
func StopEventByPath ¶
Add an event that marks the end of a timestamped step using full name
func (*TimeStamp) DisplayName ¶
Returns full name of the step starting from the root, i.e A/B/C
func (*TimeStamp) ElapsedTime ¶
Calculates the elapsed time of a step, returns -1 if the end time is not yet available
type TimeStampManager ¶
type TimeStampManager struct { EventQueue chan *TimeStampRecord // events to be processed and recorded to file TimeStampWriteManager // interface to handle all file writing TimeStampReadManager // interface to handle all in-memory structures // contains filtered or unexported fields }
The TimeStampManager provides the main interface for actions taken on timestamp objects.
type TimeStampReadManager ¶
type TimeStampReadManager struct {
// contains filtered or unexported fields
}
The read manager is responsible for holding an in-memory data structure for the timestamps, starting from the root node. Read manager provides interface for querying the current state of the timestamps.
type TimeStampRecord ¶
type TimeStampRecord struct { EventType EventType `json:"EventType"` *TimeStamp // contains filtered or unexported fields }
Represents an event during recording of a timestamped step
type TimeStampWriteManager ¶
type TimeStampWriteManager struct {
// contains filtered or unexported fields
}
The write manager is responsible for holding a write buffer and flushing it to file periodically. It is supposed to be running in a separate goroutine so the main build process performance is not affected.