summaryrefslogtreecommitdiff
path: root/internal/flags
diff options
context:
space:
mode:
Diffstat (limited to 'internal/flags')
-rw-r--r--internal/flags/flags.go2
-rw-r--r--internal/flags/flags_test.go10
2 files changed, 12 insertions, 0 deletions
diff --git a/internal/flags/flags.go b/internal/flags/flags.go
index 9161378..fc42210 100644
--- a/internal/flags/flags.go
+++ b/internal/flags/flags.go
@@ -44,6 +44,7 @@ type Config struct {
// Output/runtime flags
PlainMode bool
FlamegraphOutput bool
+ ParquetPath string
OutputName string
TestFlames bool
TestLiveFlames bool
@@ -170,6 +171,7 @@ func parse() error {
flag.BoolVar(&cfg.PlainMode, "plain", false, "Enable plain CSV output mode (disable TUI)")
flag.BoolVar(&cfg.FlamegraphOutput, "flamegraph", false, "Write aggregated .ior.zst output for trace/integration workflows")
+ flag.StringVar(&cfg.ParquetPath, "parquet", cfg.ParquetPath, "Write all traced syscall rows directly to a parquet file and skip the TUI")
flag.StringVar(&cfg.OutputName, "name", cfg.OutputName, "Base name for .ior.zst trace output files")
flag.BoolVar(&cfg.TestFlames, "testflames", false, "Run TUI with static synthetic flamegraph data for keyboard-navigation testing")
flag.BoolVar(&cfg.TestLiveFlames, "testliveflames", false, "Run TUI with continuously-updating synthetic flamegraph data for live keyboard-navigation testing")
diff --git a/internal/flags/flags_test.go b/internal/flags/flags_test.go
index 4485f34..f5274d8 100644
--- a/internal/flags/flags_test.go
+++ b/internal/flags/flags_test.go
@@ -115,6 +115,16 @@ func TestParseFlamegraphOutputFlags(t *testing.T) {
}
}
+func TestParseParquetOutputFlag(t *testing.T) {
+ cfg, err := parseForTest(t, "--parquet", "trace-run")
+ if err != nil {
+ t.Fatalf("parse returned error: %v", err)
+ }
+ if got, want := cfg.ParquetPath, "trace-run"; got != want {
+ t.Fatalf("parquet path = %q, want %q", got, want)
+ }
+}
+
func TestParseDefaultCollapsedFieldsOrder(t *testing.T) {
cfg, err := parseForTest(t)
if err != nil {