diff options
| author | Paul Buetow <paul@buetow.org> | 2025-06-26 22:32:14 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-06-26 22:32:14 +0300 |
| commit | 91e4743ce5ddab8f6359009bb45e243d4726bcdb (patch) | |
| tree | 33b013567f4bdd84023c8879e07c5dd8e06cd6d2 | |
| parent | 947e08e4f9e3c9c44b346adff4eb6d68fa79a726 (diff) | |
Fix dmap CSV query syntax in profiling tool
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 <noreply@anthropic.com>
| -rw-r--r-- | internal/tools/profile/profile.go | 2 |
1 files changed, 1 insertions, 1 deletions
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")}}, } |
