qlib

package
v0.0.0-...-15f103b Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2026 License: MIT Imports: 11 Imported by: 0

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

type QuerySection struct {
	FunctionName string
	Queries      []Query
}

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

Jump to

Keyboard shortcuts

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