Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMarkdownContent ¶
func GenerateMarkdownContent(querySections []QuerySection, matchedResults map[string]*models.SourceLine, funcStats map[string]*models.FunctionStat, unit string) string
func MatchQueries ¶
func MatchQueries(querySections []QuerySection, allLines []*models.SourceLine) (matchedResults map[string]*models.SourceLine)
Types ¶
type Query ¶
type Query struct {
models.SourceLine
Code string
}
Query represents a single line query with file:line and code comment
type QueryResult ¶
type QueryResult struct {
Found bool // whether the code is found
Filename string
LineNumber int
Code string
Cum time.Duration // Cumulative time
Flat time.Duration // Flat time (time spent directly in this function)
}
QueryResult represents query results with code information
type QuerySection ¶
QuerySection represents a section in the query file
func CreateQuerySection ¶
func CreateQuerySection(funcName string, lines []string) QuerySection
createQuerySection creates a QuerySection from function name and query lines
func ParseQueryFile ¶
func ParseQueryFile(filename string) ([]QuerySection, error)
func (QuerySection) WriteFunctionCSV ¶
func (querySection QuerySection) WriteFunctionCSV(outputDir string, matchedResults map[string]*models.SourceLine, funcStat *models.FunctionStat, unit string) error
Click to show internal directories.
Click to hide internal directories.