Skip to content

First-useful: keep the events before the first dropped trace line #347

Open

Description

@napetrov

Follow-up from #332 (review thread on runner.py, dropped lines discard all events).

Today a trace with any dropped line (a non-JSON line, or a block the converter cannot type) gets
first_useful.reason = "unobserved" for the whole cell, even when the useful hit happened before
the drop. The maintainer chose to keep this all-or-nothing policy in #332: it is never a wrong time.

Proposal for a follow-up: keep the events read before the first dropped line, so a hit before the
drop is reported with its time. Cases, on the #332 head:

  • A: hit at 0s, a non-JSON line, a hit at 5s. Today: unobserved. With the proposal: hit at 0s.
  • B: a non-JSON line first, a hit after it. Today and with the proposal: unobserved.
  • C: no dropped line. Today: hit at 0s.

Caveat: cutting by index is fragile. cli_traces.py removes events from the list after the drop is
recorded (around line 639), so an index taken at drop time can shift. The fix needs the cut recorded
on the event itself, or the cut taken after conversion.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions