subunit-filter leaves in all the time statements

Bug #623654 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subunit
Confirmed
Undecided
John A Meinel

Bug Description

If you run 'subunit-filter' on a stream, it still passes through all of the 'time' statements. In the case of running a bzr pqm output, and filtering out everything that isn't an actual failure or error, this ended up with a 2.4MB file with nothing but 'time:' statements and about 10 lines of actual failure information.

The approach I'm probably going to take is a state machine with:
  if the last thing I did was output a time: line
  and the next thing I'm going to do is going to output a time line
  omit the next line for now, but mark it pending
  if the next line is not a time line, and I have a pending time line, emit it.

The idea is that if you just did an operation, then you probably want to know what time it ended. And if you are about to start a new operation, then you want to know what time it started. But all the times inbetween are just noise.

So if you had:

time
test.success
time

All of them would be output. If you had

time
test.success
time
time

All would be output (one is the end of the test suite, one is the length of the success run), but

time 1
test.success
time 2
time 3
time 4

would get truncated to

time 1
test.success
time 2
time 4

However, filtering a stream 2x should produce the same output as a single filter.

Related branches

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 623654] [NEW] subunit-filter leaves in all the time statements

Sounds fine to me. To put it a way I can understand:
when there are three or more time: statements with nothing between
them, the middle ones can be discarded.

Revision history for this message
Jonathan Lange (jml) wrote :
John A Meinel (jameinel)
Changed in subunit:
assignee: nobody → John A Meinel (jameinel)
status: New → Confirmed
Revision history for this message
John A Meinel (jameinel) wrote :

Sorry about the dupe. Launchpad gave me exactly 0 possible dupes for my bug when reporting it.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 623654] Re: subunit-filter leaves in all the time statements

On Wed, Aug 25, 2010 at 12:52 PM, John A Meinel <email address hidden> wrote:
> *** This bug is a duplicate of bug 567150 ***
>    https://bugs.launchpad.net/bugs/567150
>
> Sorry about the dupe. Launchpad gave me exactly 0 possible dupes for my
> bug when reporting it.

Since the last rollout, launchpad searches for bugs matching all-1 of
your terms, so describing the bug less precisely will help.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.