From 91e4743ce5ddab8f6359009bb45e243d4726bcdb Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 26 Jun 2025 22:32:14 +0300 Subject: Fix dmap CSV query syntax in profiling tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The WHERE clause in dmap queries uses 'eq' operator for string equality, not '=' or '=='. This was causing the CSV profiling query to fail with a parsing error. Fixed query: - Changed from: where $status = "success" - Changed to: where $status eq "success" 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- internal/tools/profile/profile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/tools/profile/profile.go b/internal/tools/profile/profile.go index 34dfc7e..d87662c 100644 --- a/internal/tools/profile/profile.go +++ b/internal/tools/profile/profile.go @@ -198,7 +198,7 @@ func runFullProfile(cfg *Config) error { "-query", "from STATS select sum($goroutines),avg($cgocalls),max(lifetimeConnections)", "-files", filepath.Join(cfg.TestDataDir, "dtail_format.log")}}, {"dmap", "csv_query", []string{"-profile", "-profiledir", cfg.ProfileDir, "-plain", "-cfg", "none", - "-query", `select user,action,count(*) where status="success" group by user,action logformat csv`, + "-query", `select count($line),count($user),count($action) group by $user,$action where $status eq "success" logformat csv`, "-files", filepath.Join(cfg.TestDataDir, "test.csv")}}, } -- cgit v1.2.3