Skip to content

rtk pipe -f go-test drops benchmark results #4862

Open

Description

@KuSh

rtk pipe -f go-test reduces a go test -json -bench stream to test counts and drops the benchmark lines.

Go 1.24.6, go test -json -v=false -bench . -benchtime 10x ./benchok (one passing test, one benchmark that calls b.Log), piped to rtk pipe -f go-test:

Go test: No tests found

The stream contains BenchmarkX-24 10 1389 ns/op in its output events. With the default chatty JSON (Go 1.27.1, same command without -v=false) the output is Go test: 1 passed in 1 packages and the ns/op line is dropped as well.

Same output on v1.0.1 and on develop 6c2313a. #1445 fixed this for rtk go test, which no longer injects -json for -bench runs; the pipe path still goes through the test-count reducer.

Activity

  1. rtk-wshm-sync-bot commented on Oct 30, 2026

    @rtk-wshm-sync-bot

    wshm · Automated triage by AI

    🔍 Automated Triage

    🐛 Category bug
    🟡 Priority medium
    🎯 Confidence 90%

    Summary

    rtk pipe -f go-test still routes -bench output through the test-count reducer, dropping benchmark lines; related fix in #1445 only covered rtk go test.

    This looks like a simple fix that could be auto-resolved. Repo maintainers can use /wshm fix to attempt it.

    📁 Relevant files
    • src/pipe/go_test.rs

    Suggested Actions

    1. Reuse the bug(go): go test filter returns 'No tests found' for benchmarks and silently drops fuzz output #1445 detection logic (skip -json injection/reduction for -bench) in the pipe path
    2. Add a regression test piping go test -json -bench output through rtk pipe -f go-test
    3. Verify both -v=false and default chatty JSON cases preserve ns/op benchmark lines

    Triaged automatically by wshm · This is an automated analysis, not a human review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:clibugpriority:medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions