summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-04 15:35:16 +0300
committerPaul Buetow <paul@buetow.org>2025-07-04 15:35:16 +0300
commitd37f32deb6cd6a575cc169adf1a1c1fba44e53d9 (patch)
treeaaf5f6abc90066892a6a23cb619969ddd4ef5574 /cmd
parent1249f9ec51b1355ca17f73244dcbe0acc5556516 (diff)
feat: add Profile-Guided Optimization (PGO) support
- Add comprehensive PGO module in internal/tools/pgo/ - Integrate PGO into dtail-tools command with full CLI support - Add Makefile targets for PGO workflow: - make pgo: Full PGO workflow - make pgo-quick: Quick PGO with smaller datasets - make pgo-generate: Generate profiles only - make build-pgo: Build with existing profiles - make install-pgo: Install optimized binaries - Add convenience functions to data generator for PGO - Document PGO workflow in CLAUDE.md Performance improvements observed: - DCat: 3.8-7.0% additional improvement over turbo mode - DGrep: Up to 19% improvement for low hit rates - DMap: Variable impact, up to 64% for min_max on large files Benchmarks show total performance gains (pre-turbo → turbo+PGO): - DCat: 14-21x faster - DGrep: 9-15x faster - DMap: 9-29% faster 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/dtail-tools/main.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/dtail-tools/main.go b/cmd/dtail-tools/main.go
index 591ed4b..2b96a56 100644
--- a/cmd/dtail-tools/main.go
+++ b/cmd/dtail-tools/main.go
@@ -5,6 +5,7 @@ import (
"os"
"github.com/mimecast/dtail/internal/tools/benchmark"
+ "github.com/mimecast/dtail/internal/tools/pgo"
"github.com/mimecast/dtail/internal/tools/profile"
)
@@ -30,6 +31,11 @@ func main() {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
+ case "pgo":
+ if err := pgo.Run(); err != nil {
+ fmt.Fprintf(os.Stderr, "Error: %v\n", err)
+ os.Exit(1)
+ }
case "help", "-h", "--help":
printUsage()
default:
@@ -47,6 +53,7 @@ func printUsage() {
fmt.Println("Commands:")
fmt.Println(" profile Run profiling on dtail commands")
fmt.Println(" benchmark Run benchmarks and manage baselines")
+ fmt.Println(" pgo Profile-Guided Optimization for dtail commands")
fmt.Println(" help Show this help message")
fmt.Println()
fmt.Println("Run 'dtail-tools <command> -h' for command-specific help")