Skip to content

Commit

Permalink
WPA Plugin Fixes for Stream Timing Breakdowns (#3841)
Browse files Browse the repository at this point in the history
  • Loading branch information
nibanks authored Sep 6, 2023
1 parent f91ccc2 commit dd50a20
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/plugins/trace/dll/DataModel/QuicStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public sealed class QuicStream : IQuicObject
{
public static QuicStream New(ulong pointer, uint processId) => new QuicStream(pointer, processId);

public static ushort CreateEventId => (ushort)QuicEventId.StreamCreated;
public static ushort CreateEventId => (ushort)QuicEventId.StreamAlloc;

public static ushort DestroyedEventId => (ushort)QuicEventId.StreamDestroyed;

Expand Down Expand Up @@ -218,6 +218,18 @@ internal void AddEvent(QuicEvent evt, QuicState state)
}
}

if (InitialTimeStamp > Timings.RecvPacket.PacketReceive)
{
// Stream was created after packet recieved
Timings.UpdateToState(QuicStreamState.Alloc, InitialTimeStamp);
}

if (FinalTimeStamp > Timings.LastStateChangeTime)
{
// Other events between Decrypt and StreamReceiveFrame
Timings.UpdateToState(QuicStreamState.ProcessRecv, FinalTimeStamp);
}

Timings.UpdateToState(QuicStreamState.Read, evt.TimeStamp);
}
break;
Expand Down

0 comments on commit dd50a20

Please sign in to comment.