summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-06-26 20:57:53 +0300
committerPaul Buetow <paul@buetow.org>2025-06-26 20:57:53 +0300
commit4a657e44e7111d7d3b9a9ba5e453901e19af2ecb (patch)
tree5cc8571e00a29ab7656633984fb9893ca369ccec /benchmarks
parentee5250441a2d241dc1a980dfd051a12f2db898cf (diff)
fix: resolve package conflicts and update documentation
- Move main package files to benchmarks/cmd/ to fix test failures - Update CLAUDE.md with comprehensive benchmarking and profiling instructions - Fix unused imports in serverless.go - Remove experimental buffered pipe/copy implementations - Remove outdated documentation files All integration tests now pass successfully. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/cmd/generate_profile_data.go (renamed from benchmarks/generate_profile_data.go)0
-rw-r--r--benchmarks/cmd/profile_example.go (renamed from benchmarks/profile_example.go)14
-rwxr-xr-xbenchmarks/profile_benchmarks.sh8
3 files changed, 12 insertions, 10 deletions
diff --git a/benchmarks/generate_profile_data.go b/benchmarks/cmd/generate_profile_data.go
index 0b34047..0b34047 100644
--- a/benchmarks/generate_profile_data.go
+++ b/benchmarks/cmd/generate_profile_data.go
diff --git a/benchmarks/profile_example.go b/benchmarks/cmd/profile_example.go
index 8d3ffcb..f996565 100644
--- a/benchmarks/profile_example.go
+++ b/benchmarks/cmd/profile_example.go
@@ -149,29 +149,31 @@ func profileDMap(csvFile string) {
return
}
- // Run dmap with profiling
+ // Run dmap with profiling - correct syntax with -files flag
queries := []string{
- fmt.Sprintf("select count(*) from %s", absPath),
- fmt.Sprintf("select user, count(*) from %s group by user", absPath),
- fmt.Sprintf("select action, avg(duration), max(duration) from %s group by action", absPath),
+ "select count(*)",
+ "select user, count(*) group by user",
+ "select action, avg(duration), max(duration) group by action",
}
for i, query := range queries {
- fmt.Printf(" Query %d: %s\n", i+1, truncateQuery(query))
+ fmt.Printf(" Query %d: %s\n", i+1, query)
cmd := exec.Command("../dmap",
"-profile",
"-profiledir", "profiles",
"-plain",
"-cfg", "none",
+ "-files", absPath,
"-query", query)
start := time.Now()
- _, err := cmd.CombinedOutput()
+ output, err := cmd.CombinedOutput()
duration := time.Since(start)
if err != nil {
fmt.Printf(" Error: %v\n", err)
+ fmt.Printf(" Output: %s\n", output)
continue
}
diff --git a/benchmarks/profile_benchmarks.sh b/benchmarks/profile_benchmarks.sh
index 1730091..6be86cd 100755
--- a/benchmarks/profile_benchmarks.sh
+++ b/benchmarks/profile_benchmarks.sh
@@ -35,8 +35,8 @@ generate_test_data() {
if [ ! -f "$filename" ]; then
echo -e "${YELLOW}Generating test data: $filename (${size})${NC}"
# Use the standalone generator
- echo " Command: go run generate_profile_data.go -size \"${size}\" -output \"$filename\" -format log"
- go run generate_profile_data.go -size "${size}" -output "$filename" -format log
+ echo " Command: go run cmd/generate_profile_data.go -size \"${size}\" -output \"$filename\" -format log"
+ go run cmd/generate_profile_data.go -size "${size}" -output "$filename" -format log
fi
}
@@ -112,8 +112,8 @@ generate_test_data "10MB" "$TEST_DATA_DIR/medium.log"
# Generate CSV data for dmap (smaller size for faster processing)
if [ ! -f "$TEST_DATA_DIR/test.csv" ]; then
echo -e "${YELLOW}Generating CSV test data${NC}"
- echo " Command: go run generate_profile_data.go -size \"10MB\" -output \"$TEST_DATA_DIR/test.csv\" -format csv"
- go run generate_profile_data.go -size "10MB" -output "$TEST_DATA_DIR/test.csv" -format csv
+ echo " Command: go run cmd/generate_profile_data.go -size \"10MB\" -output \"$TEST_DATA_DIR/test.csv\" -format csv"
+ go run cmd/generate_profile_data.go -size "10MB" -output "$TEST_DATA_DIR/test.csv" -format csv
fi
echo