Documentation ¶
Overview ¶
Package profiler computes and reports on the time spent on expressions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExprStats ¶
type ExprStats struct { ExprTimeNs int64 `json:"total_time_ns"` NumEval int `json:"num_eval"` NumRedo int `json:"num_redo"` Location *ast.Location `json:"location"` }
ExprStats represents the result of profiling an expression.
type FileReport ¶
type FileReport struct {
Result []ExprStats `json:"result"`
}
FileReport represents a profiler report for a single file.
type Profiler ¶
type Profiler struct {
// contains filtered or unexported fields
}
Profiler computes and reports on the time spent on expressions.
func (*Profiler) ReportByFile ¶
ReportByFile returns a profiler report for expressions grouped by the file name. For each file the results are sorted by increasing row number.
func (*Profiler) ReportTopNResults ¶
ReportTopNResults returns the top N results based on the given criteria. If N <= 0, all the results based on the criteria are returned.
type Report ¶
type Report struct {
Files map[string]*FileReport `json:"files"`
}
Report represents the profiler report for a set of files.
Click to show internal directories.
Click to hide internal directories.