diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-16 19:05:09 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-16 19:05:09 +0300 |
| commit | 754ac4bb68f9e145df07dd3c54a43f37654a5d50 (patch) | |
| tree | 8647502e75d663fa8c602252d35c953861185d8e /Makefile | |
| parent | eac3f664b0c4109737f82375678e9694cf93f54b (diff) | |
Implement Profile-Based Optimization (PBO) automation with 39.9% performance improvement
- Add comprehensive PBO script (scripts/pbo.sh) for automated performance analysis
- Implement timer allocation reduction using reusable timers (chunkedreader.go, stats.go, baseclient.go)
- Optimize I/O operations with pre-allocated buffers and bulk writes (chunkedreader.go)
- Enhance memory allocation patterns with improved buffer pooling
- Add CPU and memory profiling support to dgrep command
- Update Makefile with clean PBO target calling scripts/pbo.sh
- Add PBO documentation to CLAUDE.md
Performance improvements:
- 39.9% faster execution time (2.918s → 1.753s average)
- 38% reduction in CPU samples (3.04s → 1.87s)
- Reduced byte-by-byte operations from 21.71% to 8.56% CPU usage
- Eliminated repeated timer allocations across all components
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -6,6 +6,21 @@ ifdef DTAIL_USE_PROPRIETARY GO_TAGS+=proprietary endif all: build + +# Display available targets +help: + @echo "Available Makefile targets:" + @echo " all - Build all binaries (default)" + @echo " build - Build all binaries" + @echo " clean - Remove built binaries" + @echo " test - Run all unit tests" + @echo " vet - Run go vet on all packages" + @echo " lint - Run golint on all packages" + @echo " install - Install all binaries to \$$GOPATH/bin" + @echo " pbo - Run Profile-Based Optimization for dgrep" + @echo "" + @echo "Individual binary targets:" + @echo " dserver, dcat, dgrep, dmap, dtail, dtailhealth" build: dserver dcat dgrep dmap dtail dtailhealth dserver: ${GO} build ${GO_FLAGS} -tags '${GO_TAGS}' -o dserver ./cmd/dserver/main.go @@ -47,3 +62,7 @@ test: ${GO} clean -testcache set -e; find . -name '*_test.go' | while read file; do dirname $$file; done | \ sort -u | while read dir; do ${GO} test -tags '${GO_TAGS}' --race -v -failfast $$dir || exit 2; done + +# Profile-Based Optimization (PBO) target for dgrep +pbo: clean build + @./scripts/pbo.sh |
