Documentation ¶
Index ¶
Constants ¶
View Source
const ( Lines FuncMeasurement = "lines" TotalLines = "total_lines" Len = "len" TotalLen = "total_len" CommentLines = "comment_lines" Comments = "comments" Complexity = "complexity" MaxNesting = "max_nesting" TotalNesting = "total_nesting" InputParams = "in_params" OutputParams = "out_params" Variables = "variables" Assignments = "assignments" Control = "control" Todos = "todos" TodosCaseinsensitive = "todos_case_insensitive" )
Variables ¶
View Source
var AllTypes = []FuncMeasurement{ Lines, TotalLines, Len, TotalLen, CommentLines, Comments, Complexity, MaxNesting, TotalNesting, InputParams, OutputParams, Variables, Assignments, Control, Todos, TodosCaseinsensitive, }
Functions ¶
func PrintUsage ¶
func PrintUsage(msg string, params ...interface{})
Types ¶
type CmdParams ¶
type FuncMeasurement ¶
type FuncMeasurement string
func ParseTypes ¶
func ParseTypes(types string) ([]FuncMeasurement, error)
type FunctionStats ¶
type FunctionStats struct {
Receiver, Name, Location string
// contains filtered or unexported fields
}
func Do ¶
func Do(params CmdParams, paths []string) []FunctionStats
func (FunctionStats) FuncWithRecv ¶
func (fs FunctionStats) FuncWithRecv() string
func (FunctionStats) Get ¶
func (fs FunctionStats) Get(ty FuncMeasurement) (float64, error)
func (FunctionStats) Incr ¶
func (fs FunctionStats) Incr(ty FuncMeasurement, value float64)
func (FunctionStats) Set ¶
func (fs FunctionStats) Set(ty FuncMeasurement, value float64)
type FunctionStatsList ¶
type FunctionStatsList struct { SortType FuncMeasurement Stats []FunctionStats }
func (FunctionStatsList) Len ¶
func (s FunctionStatsList) Len() int
func (FunctionStatsList) Less ¶
func (s FunctionStatsList) Less(i, j int) bool
func (FunctionStatsList) Swap ¶
func (s FunctionStatsList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.