Skip to content

feat(nvd): Add functions to help monitor performance - ConductAnalysis and CpuProfile#4817

Merged
jess-lowe merged 3 commits intogoogle:masterfrom
jess-lowe:feat/conduct-analysis
Feb 17, 2026
Merged

feat(nvd): Add functions to help monitor performance - ConductAnalysis and CpuProfile#4817
jess-lowe merged 3 commits intogoogle:masterfrom
jess-lowe:feat/conduct-analysis

Conversation

@jess-lowe
Copy link
Contributor

Added CPU profiling to nvd conversion so we can easily check what's taking the most time, and ConductAnalysis, which runs through all of the outputted metrics files after conversion runs and produces a CSV file on the outcomes.

@jess-lowe jess-lowe requested a review from tobyhawker February 16, 2026 05:11
tobyhawker
tobyhawker previously approved these changes Feb 16, 2026
Comment on lines +58 to 70
if *cpuProfile != "" {
f, err := os.Create(*cpuProfile)
if err != nil {
logger.Fatal("could not create CPU profile: ", slog.Any("err", err))
}
defer f.Close()
if err := pprof.StartCPUProfile(f); err != nil {
logger.Fatal("could not start CPU profile: ", slog.Any("err", err))
}
defer pprof.StopCPUProfile()
}

logger.InitGlobalLogger()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: setting up the profiler should probably go after logger.InitGlobalLogger() (though it doesn't actually make a difference)

@jess-lowe jess-lowe merged commit cc26493 into google:master Feb 17, 2026
19 checks passed
@jess-lowe jess-lowe deleted the feat/conduct-analysis branch February 17, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants