feat(profiling): Add CPU and MEM profiling

This commit is contained in:
2026-04-06 13:15:09 +01:00
parent 0dc77c4583
commit cd8a6c5433
17 changed files with 631 additions and 2740 deletions
+5 -4
View File
@@ -1,4 +1,3 @@
// ./internal/qol/utils.go
package qol
import (
@@ -8,7 +7,7 @@ import (
"strings"
)
func GenerateOutputPaths(outputDir, upstream string, dnssec, authDNSSEC, keepAlive bool) (csvPath, pcapPath string) {
func GenerateOutputPaths(outputDir, upstream string, dnssec, authDNSSEC, keepAlive bool) (csvPath, pcapPath, memPath string) {
proto := DetectProtocol(upstream)
cleanServer := cleanServerName(upstream)
@@ -32,8 +31,10 @@ func GenerateOutputPaths(outputDir, upstream string, dnssec, authDNSSEC, keepAli
base = fmt.Sprintf("%s-%s", base, strings.Join(flags, "-"))
}
return filepath.Join(subDir, base+".csv"),
filepath.Join(subDir, base+".pcap")
csvPath = filepath.Join(subDir, base+".csv")
pcapPath = filepath.Join(subDir, base+".pcap")
memPath = filepath.Join(subDir, base+".mem.csv")
return
}
func cleanServerName(server string) string {