MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / adjustPerformanceScore

Method adjustPerformanceScore

cmd/gosqlx/cmd/sql_analyzer.go:378–393  ·  view source on GitHub ↗
(severity IssueSeverity)

Source from the content-addressed store, hash-verified

376}
377
378func (a *SQLAnalyzer) adjustPerformanceScore(severity IssueSeverity) {
379 switch severity {
380 case IssueSeverityCritical:
381 a.PerformanceScore -= 25
382 case IssueSeverityHigh:
383 a.PerformanceScore -= 15
384 case IssueSeverityMedium:
385 a.PerformanceScore -= 10
386 case IssueSeverityLow:
387 a.PerformanceScore -= 5
388 }
389
390 if a.PerformanceScore < 0 {
391 a.PerformanceScore = 0
392 }
393}
394
395// calculateComplexityMetrics calculates complexity metrics
396func (a *SQLAnalyzer) calculateComplexityMetrics() {

Callers 1

addPerformanceIssueMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected