MCPcopy Create free account
hub / github.com/github/gh-aw / launchCoreAuditAnalyses

Function launchCoreAuditAnalyses

pkg/cli/audit.go:613–645  ·  view source on GitHub ↗
(wg *sync.WaitGroup, results *auditAnalysisResults, run WorkflowRun, runOutputDir string, verbose bool)

Source from the content-addressed store, hash-verified

611}
612
613func launchCoreAuditAnalyses(wg *sync.WaitGroup, results *auditAnalysisResults, run WorkflowRun, runOutputDir string, verbose bool) {
614 // Resolve experiment assignment once so all goroutines reuse the same values
615 // rather than each reading state.json independently.
616 expName, expVariant, _ := firstExperimentAssignment(extractExperimentData(runOutputDir))
617
618 launchMetricsAnalysis(wg, results, runOutputDir, verbose, run.WorkflowPath)
619 launchJobDetailsAnalysis(wg, results, run.DatabaseID, verbose)
620 runAuditAnalysis(wg, verbose, "extractMissingToolsFromRun", "Failed to extract missing tools", func(v []MissingToolReport) {
621 results.missingTools = v
622 }, func() ([]MissingToolReport, error) {
623 return extractMissingToolsFromRun(runOutputDir, run, verbose, expName, expVariant)
624 })
625 runAuditAnalysis(wg, verbose, "extractMissingDataFromRun", "Failed to extract missing data", func(v []MissingDataReport) {
626 results.missingData = v
627 }, func() ([]MissingDataReport, error) {
628 return extractMissingDataFromRun(runOutputDir, run, verbose, expName, expVariant)
629 })
630 runAuditAnalysis(wg, verbose, "extractNoopsFromRun", "Failed to extract noops", func(v []NoopReport) {
631 results.noops = v
632 }, func() ([]NoopReport, error) {
633 return extractNoopsFromRun(runOutputDir, run, verbose, expName, expVariant)
634 })
635 runAuditAnalysis(wg, verbose, "extractMCPFailuresFromRun", "Failed to extract MCP failures", func(v []MCPFailureReport) {
636 results.mcpFailures = v
637 }, func() ([]MCPFailureReport, error) {
638 return extractMCPFailuresFromRun(runOutputDir, run, verbose, expName, expVariant)
639 })
640 runAuditAnalysis(wg, verbose, "analyzeAccessLogs", "Failed to analyze access logs", func(v *DomainAnalysis) {
641 results.accessAnalysis = v
642 }, func() (*DomainAnalysis, error) {
643 return analyzeAccessLogs(runOutputDir, verbose)
644 })
645}
646
647func launchMetricsAnalysis(wg *sync.WaitGroup, results *auditAnalysisResults, runOutputDir string, verbose bool, workflowPath string) {
648 wg.Go(func() {

Callers 1

Calls 10

extractExperimentDataFunction · 0.85
launchMetricsAnalysisFunction · 0.85
launchJobDetailsAnalysisFunction · 0.85
runAuditAnalysisFunction · 0.85
extractNoopsFromRunFunction · 0.85
analyzeAccessLogsFunction · 0.85

Tested by

no test coverage detected