public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Must Be Mapped GUID's"); Child.Nodes.Add("NumGuids : " + NumGuids); Child.Nodes.Add("NumBytes : " + NumBits / 8.0f); }
/** * Fills tree view with description of this token * * @param Tree Tree to fill in * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Replicated Actors"); int NumReplicatedBits = GetNumReplicatedBits(InFilterValues); string Flags = (bNetDirty ? "bNetDirty " : "") + (bNetInitial ? "bNetInitial" : "") + (bNetOwner ? "bNetOwner" : ""); Child = Child.Nodes.Add(string.Format("{0,-32} : {1:0.00} ({2:000}) ", NetworkStream.GetName(ActorNameIndex), TimeInMS, NumReplicatedBits / 8) + Flags); if (Properties.Count > 0) { TreeNode NewChild = Child.Nodes.Add("Properties"); foreach (var Property in Properties) { if (Property.MatchesFilters(InFilterValues)) { NewChild.Nodes.Add(string.Format("{0,-25} : {1:000}", NetworkStream.GetName(Property.PropertyNameIndex), Property.NumBits / 8.0f)); } } } if (PropertyHeaders.Count > 0) { TreeNode NewChild = Child.Nodes.Add("Property Headers"); foreach (var PropertyHeader in PropertyHeaders) { if (PropertyHeader.MatchesFilters(InFilterValues)) { NewChild.Nodes.Add(string.Format("{0,-25} : {1:000}", NetworkStream.GetName(PropertyHeader.PropertyNameIndex), PropertyHeader.NumBits / 8.0f)); } } } }
/** * Fills tree view with description of this token * * @param Tree Tree to fill in * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Events"); Child.Nodes.Add("Type : " + NetworkStream.GetName(EventNameNameIndex)); Child.Nodes.Add("Description : " + NetworkStream.GetName(EventDescriptionNameIndex)); }
/** * Parses tokens to create summary. */ protected void CreateSummary(int NameIndexUnreal, float DeltaTime, FilterValues InFilterValues) { foreach (TokenBase Token in Tokens) { UpdateSummary(Token, InFilterValues); } EndTime += DeltaTime; }
public void ToDetailedTreeView(TreeNodeCollection Nodes, FilterValues InFilterValues) { Nodes.Clear(); foreach (TokenBase Token in Tokens) { Token.ToDetailedTreeView(Nodes, InFilterValues); } }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against */ public virtual bool MatchesFilters(FilterValues InFilterValues) { if (TokenType == ETokenTypes.FrameMarker || TokenType == ETokenTypes.EndOfStreamMarker) { return(true); } return(InFilterValues.ConnectionMask == null || InFilterValues.ConnectionMask.Contains(ConnectionIndex)); }
public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Send Bunch"); Child = Child.Nodes.Add("Channel Type : " + ChannelType); Child.Nodes.Add("Channel Index : " + ChannelIndex); Child.Nodes.Add("NumTotalBits : " + GetNumTotalBits()); Child.Nodes.Add(" NumHeaderBits : " + NumHeaderBits); Child.Nodes.Add(" NumPayloadBits: " + NumPayloadBits); Child.Nodes.Add("NumTotalBytes : " + GetNumTotalBits() / 8.0f); }
public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "RPCs"); Child = Child.Nodes.Add(NetworkStream.GetName(FunctionNameIndex)); Child.Nodes.Add("Actor : " + NetworkStream.GetName(ActorNameIndex)); Child.Nodes.Add("NumTotalBits : " + GetNumTotalBits()); Child.Nodes.Add(" NumHeaderBits : " + NumHeaderBits); Child.Nodes.Add(" NumParameterBits : " + NumParameterBits); Child.Nodes.Add(" NumFooterBits : " + NumFooterBits); Child.Nodes.Add("NumTotalBytes : " + GetNumTotalBits() / 8.0f); }
public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Socket SendTo"); Child = Child.Nodes.Add("Destination : " + NetworkStream.GetIpString(ConnectionIndex)); Child.Nodes.Add("SocketName : " + NetworkStream.GetName(SocketNameIndex)); Child.Nodes.Add("DesiredBytesSent : " + (NumPacketIdBits + NumBunchBits + NumAckBits + NumPaddingBits) / 8.0f); Child.Nodes.Add(" NumPacketIdBits : " + NumPacketIdBits); Child.Nodes.Add(" NumBunchBits : " + NumBunchBits); Child.Nodes.Add(" NumAckBits : " + NumAckBits); Child.Nodes.Add(" NumPaddingBits : " + NumPaddingBits); Child.Nodes.Add("BytesSent : " + BytesSent); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters(FilterValues InFilterValues) { bool ContainsMatchingProperty = false || (Properties.Count == 0 && InFilterValues.PropertyFilter.Length == 0); foreach (var Property in Properties) { if (Property.MatchesFilters(InFilterValues)) { ContainsMatchingProperty = true; break; } } return(base.MatchesFilters(InFilterValues) && (InFilterValues.ActorFilter.Length == 0 || NetworkStream.GetName(ActorNameIndex).ToUpperInvariant().Contains(InFilterValues.ActorFilter.ToUpperInvariant())) && ContainsMatchingProperty); }
public override void ToDetailedTreeView(ItemCollection Tree, FilterValues InFilterValues) { TreeViewItem Child = TokenHelper.AddNode(Tree, "Send Bunch"); TreeViewItem GrandChild = new TreeViewItem(); GrandChild.Header = "Channel Type : " + StreamParser.NetworkStream.GetChannelTypeName(GetChannelTypeIndex()); Child.Items.Add(GrandChild); Child = GrandChild; Child.Items.Add("Channel Index : " + ChannelIndex); Child.Items.Add("NumTotalBits : " + GetNumTotalBits()); Child.Items.Add(" NumHeaderBits : " + NumHeaderBits); Child.Items.Add(" NumPayloadBits: " + NumPayloadBits); Child.Items.Add("NumTotalBytes : " + GetNumTotalBits() / 8.0f); }
/** * Constructor, duplicating the passed in stream while applying the passed in filters. * * @param InStream Stream to duplicate * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against */ public PartialNetworkStream(PartialNetworkStream InStream, FilterValues InFilterValues) { NameIndexUnreal = InStream.NameIndexUnreal; FirstFrameDeltaTime = InStream.FirstFrameDeltaTime; // Merge tokens from passed in stream based on filter criteria. foreach (var Token in InStream.Tokens) { if (Token.MatchesFilters(InFilterValues)) { Tokens.Add(Token); } } CreateSummary(NameIndexUnreal, FirstFrameDeltaTime, InFilterValues); }
public override void ToDetailedTreeView(ItemCollection Tree, FilterValues InFilterValues) { TreeViewItem Child = TokenHelper.AddNode(Tree, "RPCs"); TreeViewItem GrandChild = new TreeViewItem(); GrandChild.Header = StreamParser.NetworkStream.GetName(FunctionNameIndex); Child.Items.Add(GrandChild); Child = GrandChild; Child.Items.Add("Actor : " + StreamParser.NetworkStream.GetName(ActorNameIndex)); Child.Items.Add("NumTotalBits : " + GetNumTotalBits()); Child.Items.Add(" NumHeaderBits : " + NumHeaderBits); Child.Items.Add(" NumParameterBits : " + NumParameterBits); Child.Items.Add(" NumFooterBits : " + NumFooterBits); Child.Items.Add("NumTotalBytes : " + GetNumTotalBits() / 8.0f); }
public override void ToDetailedTreeView(ItemCollection Tree, FilterValues InFilterValues) { TreeViewItem Child = TokenHelper.AddNode(Tree, "Socket SendTo"); TreeViewItem GrandChild = new TreeViewItem(); GrandChild.Header = "Destination : " + StreamParser.NetworkStream.GetIpString(ConnectionIndex, StreamParser.NetworkStream.GetVersion()); Child.Items.Add(GrandChild); Child = GrandChild; Child.Items.Add("SocketName : " + StreamParser.NetworkStream.GetName(SocketNameIndex)); Child.Items.Add("DesiredBytesSent : " + (NumPacketIdBits + NumBunchBits + NumAckBits + NumPaddingBits) / 8.0f); Child.Items.Add(" NumPacketIdBits : " + NumPacketIdBits); Child.Items.Add(" NumBunchBits : " + NumBunchBits); Child.Items.Add(" NumAckBits : " + NumAckBits); Child.Items.Add(" NumPaddingBits : " + NumPaddingBits); Child.Items.Add("BytesSent : " + BytesSent); }
/** * Fills tree view with description of this token * * @param Tree Tree to fill in * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public override void ToDetailedTreeView(ItemCollection Tree, FilterValues InFilterValues) { TreeViewItem Child = TokenHelper.AddNode(Tree, "Replicated Actors"); int NumReplicatedBits = GetNumReplicatedBits(InFilterValues); string Flags = ((NetFlags & (byte)ENetFlags.Dirty) == 1 ? "bNetDirty " : "") + ((NetFlags & (byte)ENetFlags.Initial) == 1 ? "bNetInitial" : "") + ((NetFlags & (byte)ENetFlags.Owner) == 1 ? "bNetOwner" : ""); TreeViewItem GrandChild = new TreeViewItem(); GrandChild.Header = string.Format("{0,-32} : {1:0.00} ({2:000}) ", StreamParser.NetworkStream.GetName(ActorNameIndex), TimeInMS, NumReplicatedBits / 8) + Flags; Child.Items.Add(GrandChild); Child = GrandChild; if (Properties.Count > 0) { TreeViewItem NewChild = new TreeViewItem(); NewChild.Header = "Properties"; Child.Items.Add(NewChild); foreach (var Property in Properties) { if (Property.MatchesFilters(InFilterValues)) { NewChild.Items.Add(string.Format("{0,-25} : {1:000}", StreamParser.NetworkStream.GetName(Property.PropertyNameIndex), Property.NumBits / 8.0f)); } } } if (PropertyHeaders.Count > 0) { TreeViewItem NewChild = new TreeViewItem(); NewChild.Header = "Property Headers"; Child.Items.Add(NewChild); foreach (var PropertyHeader in PropertyHeaders) { if (PropertyHeader.MatchesFilters(InFilterValues)) { NewChild.Items.Add(string.Format("{0,-25} : {1:000}", StreamParser.NetworkStream.GetName(PropertyHeader.PropertyNameIndex), PropertyHeader.NumBits / 8.0f)); } } } }
/** * Returns the number of bits for this replicated actor while taking filters into account. * * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public int GetNumReplicatedBits(FilterValues InFilterValues) { int NumReplicatedBits = 0; foreach (var Property in Properties) { if (Property.MatchesFilters(InFilterValues)) { NumReplicatedBits += Property.NumBits; } } foreach (var PropertyHeader in PropertyHeaders) { if (PropertyHeader.MatchesFilters(InFilterValues)) { NumReplicatedBits += PropertyHeader.NumBits; } } return(NumReplicatedBits); }
public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Send Acks"); Child.Nodes.Add("NumBytes : " + NumBits / 8.0f); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters(FilterValues InFilterValues) { return(base.MatchesFilters(InFilterValues) && (InFilterValues.ActorFilter.Length == 0 || NetworkStream.GetName(ObjectNameIndex).ToUpperInvariant().Contains(InFilterValues.ActorFilter.ToUpperInvariant()))); }
public virtual void ToDetailedTreeView( TreeNodeCollection List, FilterValues InFilterValues ) { }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Socket SendTo" ); Child = Child.Nodes.Add( "Destination : " + NetworkStream.GetIpString( ConnectionIndex ) ); Child.Nodes.Add( "SocketName : " + NetworkStream.GetName( SocketNameIndex ) ); Child.Nodes.Add( "DesiredBytesSent : " + ( NumPacketIdBits + NumBunchBits + NumAckBits + NumPaddingBits ) / 8.0f ); Child.Nodes.Add( " NumPacketIdBits : " + NumPacketIdBits ); Child.Nodes.Add( " NumBunchBits : " + NumBunchBits ); Child.Nodes.Add( " NumAckBits : " + NumAckBits ); Child.Nodes.Add( " NumPaddingBits : " + NumPaddingBits ); Child.Nodes.Add( "BytesSent : " + BytesSent ); }
public override bool MatchesFilters( FilterValues InFilterValues ) { return base.MatchesFilters( InFilterValues ); }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Send Bunch" ); Child = Child.Nodes.Add( "Channel Type : " + ChannelType ); Child.Nodes.Add( "Channel Index : " + ChannelIndex ); Child.Nodes.Add( "NumTotalBits : " + GetNumTotalBits() ); Child.Nodes.Add( " NumHeaderBits : " + NumHeaderBits ); Child.Nodes.Add( " NumPayloadBits: " + NumPayloadBits ); Child.Nodes.Add( "NumTotalBytes : " + GetNumTotalBits() / 8.0f ); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters(FilterValues InFilterValues) { return(base.MatchesFilters(InFilterValues) && (InFilterValues.PropertyFilter.Length == 0 || StreamParser.NetworkStream.GetName(PropertyNameIndex).ToUpperInvariant().Contains(InFilterValues.PropertyFilter.ToUpperInvariant()))); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters(FilterValues InFilterValues) { return(base.MatchesFilters(InFilterValues) && (InFilterValues.ActorFilter.Length == 0 || StreamParser.NetworkStream.GetName(ActorNameIndex).ToUpperInvariant().Contains(InFilterValues.ActorFilter.ToUpperInvariant())) && (InFilterValues.RPCFilter.Length == 0 || StreamParser.NetworkStream.GetName(FunctionNameIndex).ToUpperInvariant().Contains(InFilterValues.RPCFilter.ToUpperInvariant()))); }
public static void ParseStreamIntoChart( MainWindow InMainWindow, NetworkStream NetworkStream, Chart NetworkChart, FilterValues InFilterValues ) { var StartTime = DateTime.UtcNow; InMainWindow.ShowProgress( true ); // Save old scroll position double OldPosition = NetworkChart.ChartAreas["DefaultChartArea"].AxisX.ScaleView.Position; NetworkChart.BeginInit(); // Reset existing data. for ( int i = 0; i < NetworkChart.Series.Count; i++ ) { float Percent = ( float )i / ( float )NetworkChart.Series.Count; InMainWindow.UpdateProgress( ( int )( Percent * 100 ) ); NetworkChart.Series[i].Points.Clear(); } InMainWindow.ShowProgress( true ); NetworkChart.ResetAutoValues(); NetworkChart.Invalidate(); NetworkChart.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = false; NetworkChart.ChartAreas[0].AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All; NetworkChart.ChartAreas[0].AxisX.ScrollBar.Size = 15; NetworkChart.ChartAreas[0].AxisX.ScrollBar.ButtonColor = Color.LightGray; NetworkChart.ChartAreas[0].AxisY.ScrollBar.IsPositionedInside = false; NetworkChart.ChartAreas[0].AxisY.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All; NetworkChart.ChartAreas[0].AxisY.ScrollBar.Size = 15; NetworkChart.ChartAreas[0].AxisY.ScrollBar.ButtonColor = Color.LightGray; int FrameCounter = 0; foreach( PartialNetworkStream RawFrame in NetworkStream.Frames ) { if ( FrameCounter % 1000 == 0 ) { float Percent = ( float )FrameCounter / ( float )NetworkStream.Frames.Count; InMainWindow.UpdateProgress( ( int )( Percent * 100 ) ); } PartialNetworkStream Frame = RawFrame.Filter( InFilterValues ); if( Frame.EndTime == Frame.StartTime ) { throw new InvalidOperationException(); } float OneOverDeltaTime = 1 / (Frame.EndTime - Frame.StartTime); int OutgoingBandwidth = Frame.UnrealSocketSize + Frame.OtherSocketSize + NetworkStream.PacketOverhead * ( Frame.UnrealSocketCount + Frame.OtherSocketCount ); InMainWindow.AddChartPoint( SeriesType.OutgoingBandwidthSize, FrameCounter, OutgoingBandwidth ); InMainWindow.AddChartPoint( SeriesType.OutgoingBandwidthSizeSec, FrameCounter, OutgoingBandwidth * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.ActorCount, FrameCounter, Frame.ActorCount ); InMainWindow.AddChartPoint( SeriesType.PropertySize, FrameCounter, Frame.ReplicatedSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.PropertySizeSec, FrameCounter, Frame.ReplicatedSizeBits / 8 * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.RPCSize, FrameCounter, Frame.RPCSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.RPCSizeSec, FrameCounter, Frame.RPCSizeBits / 8 * OneOverDeltaTime ); #if true InMainWindow.AddChartPoint( SeriesType.ActorCountSec, FrameCounter, Frame.ActorCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.PropertyCount, FrameCounter, Frame.PropertyCount ); InMainWindow.AddChartPoint( SeriesType.PropertyCountSec, FrameCounter, Frame.PropertyCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.RPCCount, FrameCounter, Frame.RPCCount ); InMainWindow.AddChartPoint( SeriesType.RPCCountSec, FrameCounter, Frame.RPCCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.ExportBunchCount, FrameCounter, Frame.ExportBunchCount ); InMainWindow.AddChartPoint( SeriesType.ExportBunchSize, FrameCounter, Frame.ExportBunchSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.MustBeMappedGuidsCount, FrameCounter, Frame.MustBeMappedGuidCount / 8 ); InMainWindow.AddChartPoint( SeriesType.MustBeMappedGuidsSize, FrameCounter, Frame.MustBeMappedGuidSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.SendAckCount, FrameCounter, Frame.SendAckCount ); InMainWindow.AddChartPoint( SeriesType.SendAckCountSec, FrameCounter, Frame.SendAckCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.SendAckSize, FrameCounter, Frame.SendAckSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.SendAckSizeSec, FrameCounter, Frame.SendAckSizeBits / 8 * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.ContentBlockHeaderSize, FrameCounter, Frame.ContentBlockHeaderSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.ContentBlockFooterSize, FrameCounter, Frame.ContentBlockFooterSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.PropertyHandleSize, FrameCounter, Frame.PropertyHandleSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.SendBunchCount, FrameCounter, Frame.SendBunchCount ); InMainWindow.AddChartPoint( SeriesType.SendBunchCountSec, FrameCounter, Frame.SendBunchCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.SendBunchSize, FrameCounter, Frame.SendBunchSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.SendBunchSizeSec, FrameCounter, Frame.SendBunchSizeBits / 8 * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.SendBunchHeaderSize, FrameCounter, Frame.SendBunchHeaderSizeBits / 8 ); InMainWindow.AddChartPoint( SeriesType.GameSocketSendSize, FrameCounter, Frame.UnrealSocketSize ); InMainWindow.AddChartPoint( SeriesType.GameSocketSendSizeSec, FrameCounter, Frame.UnrealSocketSize * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.GameSocketSendCount, FrameCounter, Frame.UnrealSocketCount ); InMainWindow.AddChartPoint( SeriesType.GameSocketSendCountSec, FrameCounter, Frame.UnrealSocketCount * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.ActorReplicateTimeInMS, FrameCounter, Frame.ActorReplicateTimeInMS); #endif #if false InMainWindow.AddChartPoint( SeriesType.MiscSocketSendSize, FrameCounter, Frame.OtherSocketSize ); InMainWindow.AddChartPoint( SeriesType.MiscSocketSendSizeSec, FrameCounter, Frame.OtherSocketSize * OneOverDeltaTime ); InMainWindow.AddChartPoint( SeriesType.MiscSocketSendCount, FrameCounter, Frame.OtherSocketCount ); InMainWindow.AddChartPoint( SeriesType.MiscSocketSendCountSec, FrameCounter, Frame.OtherSocketCount * OneOverDeltaTime ); #endif if ( Frame.NumEvents > 0 ) { InMainWindow.AddChartPoint( SeriesType.Events, FrameCounter, 0 ); } FrameCounter++; } //NetworkChart.DataManipulator.FinancialFormula( FinancialFormula.MovingAverage, "30", SeriesType.GameSocketSendSizeSec, SeriesType.GameSocketSendSizeAvgSec ); NetworkChart.DataManipulator.FinancialFormula( FinancialFormula.MovingAverage, "30", SeriesType.OutgoingBandwidthSizeSec.ToString(), SeriesType.OutgoingBandwidthSizeAvgSec.ToString() ); NetworkChart.ChartAreas["DefaultChartArea"].RecalculateAxesScale(); NetworkChart.ChartAreas["DefaultChartArea"].AxisX.ScaleView.Position = OldPosition; NetworkChart.EndInit(); InMainWindow.ShowProgress( false ); Console.WriteLine("Adding data to chart took {0} seconds", (DateTime.UtcNow - StartTime).TotalSeconds); }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Send Acks" ); Child.Nodes.Add( "NumBytes : " + NumBits / 8.0f ); }
/** * Fills tree view with description of this token * * @param Tree Tree to fill in * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Events" ); Child.Nodes.Add( "Type : " + NetworkStream.GetName( EventNameNameIndex ) ); Child.Nodes.Add( "Description : " + NetworkStream.GetName( EventDescriptionNameIndex ) ); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters( FilterValues InFilterValues ) { return base.MatchesFilters( InFilterValues ) && ( InFilterValues.ActorFilter.Length == 0 || NetworkStream.GetName( ObjectNameIndex ).ToUpperInvariant().Contains( InFilterValues.ActorFilter.ToUpperInvariant() ) ); }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Must Be Mapped GUID's" ); Child.Nodes.Add( "NumGuids : " + NumGuids ); Child.Nodes.Add( "NumBytes : " + NumBits / 8.0f ); }
public virtual void ToDetailedTreeView(TreeNodeCollection List, FilterValues InFilterValues) { }
/** * Fills tree view with description of this token * * @param Tree Tree to fill in * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Replicated Actors" ); int NumReplicatedBits = GetNumReplicatedBits( InFilterValues ); string Flags = ( bNetDirty ? "bNetDirty " : "" ) + ( bNetInitial ? "bNetInitial" : "" ) + ( bNetOwner ? "bNetOwner" : "" ); Child = Child.Nodes.Add( string.Format( "{0,-32} : {1:0.00} ({2:000}) ", NetworkStream.GetName( ActorNameIndex ), TimeInMS, NumReplicatedBits / 8 ) + Flags ); if ( Properties.Count > 0 ) { TreeNode NewChild = Child.Nodes.Add( "Properties" ); foreach ( var Property in Properties ) { if ( Property.MatchesFilters( InFilterValues ) ) { NewChild.Nodes.Add( string.Format( "{0,-25} : {1:000}", NetworkStream.GetName( Property.PropertyNameIndex ), Property.NumBits / 8.0f ) ); } } } if ( PropertyHeaders.Count > 0 ) { TreeNode NewChild = Child.Nodes.Add( "Property Headers" ); foreach ( var PropertyHeader in PropertyHeaders ) { if ( PropertyHeader.MatchesFilters( InFilterValues ) ) { NewChild.Nodes.Add( string.Format( "{0,-25} : {1:000}", NetworkStream.GetName( PropertyHeader.PropertyNameIndex ), PropertyHeader.NumBits / 8.0f ) ); } } } }
public override void ToDetailedTreeView(TreeNodeCollection Tree, FilterValues InFilterValues) { TreeNode Child = TokenHelper.AddNode(Tree, "Frame Markers"); Child.Nodes.Add("Absolute time : " + RelativeTime); }
public PartialNetworkStream(MainWindow InMainWindow, List <PartialNetworkStream> InStreams, int InStartFrame, int InEndFrame, int InNameIndexUnreal, FilterValues InFilterValues, float InDeltaTime) { NameIndexUnreal = InNameIndexUnreal; FirstFrameDeltaTime = InDeltaTime; InMainWindow.ShowProgress(true); InMainWindow.UpdateProgress(0); // Merge tokens from passed in streams. for (int i = InStartFrame; i < InEndFrame; i++) { PartialNetworkStream Stream = InStreams[i]; if (i % 10 == 0) { float Percent = (float)(i - InStartFrame) / (float)(InEndFrame - InStartFrame); InMainWindow.UpdateProgress(( int )(Percent * 100)); } // Merge tokens from passed in stream based on filter criteria. foreach (var Token in Stream.Tokens) { if (Token.MatchesFilters(InFilterValues)) { Tokens.Add(Token); UpdateSummary(Token, InFilterValues); } } } InMainWindow.ShowProgress(false); EndTime += InDeltaTime; }
public override bool MatchesFilters(FilterValues InFilterValues) { return(base.MatchesFilters(InFilterValues)); }
/** * Filters based on the passed in filters and returns a new partial network stream. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return new filtered network stream */ public PartialNetworkStream Filter(FilterValues InFilterValues) { return(new PartialNetworkStream(this, InFilterValues)); }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "Frame Markers" ); Child.Nodes.Add( "Absolute time : " + RelativeTime ); }
protected void UpdateSummary(TokenBase Token, FilterValues InFilterValues) { switch (Token.TokenType) { case ETokenTypes.FrameMarker: var TokenFrameMarker = (TokenFrameMarker)Token; if (StartTime < 0) { StartTime = TokenFrameMarker.RelativeTime; EndTime = TokenFrameMarker.RelativeTime; } else { EndTime = TokenFrameMarker.RelativeTime; } NumFrames++; break; case ETokenTypes.SocketSendTo: var TokenSocketSendTo = (TokenSocketSendTo)Token; // Unreal game socket if (TokenSocketSendTo.SocketNameIndex == NameIndexUnreal) { UnrealSocketCount++; UnrealSocketSize += TokenSocketSendTo.BytesSent; } else { OtherSocketCount++; OtherSocketSize += TokenSocketSendTo.BytesSent; } break; case ETokenTypes.SendBunch: var TokenSendBunch = (TokenSendBunch)Token; SendBunchCount++; SendBunchSizeBits += TokenSendBunch.GetNumTotalBits(); SendBunchHeaderSizeBits += TokenSendBunch.NumHeaderBits; int ChannelTypeIndex = TokenSendBunch.GetChannelTypeIndex(); if (SendBunchCountPerChannel.ContainsKey(ChannelTypeIndex)) { SendBunchCountPerChannel[ChannelTypeIndex]++; SendBunchSizeBitsPerChannel[ChannelTypeIndex] += TokenSendBunch.GetNumTotalBits(); SendBunchHeaderSizeBitsPerChannel[ChannelTypeIndex] += TokenSendBunch.NumHeaderBits; SendBunchPayloadSizeBitsPerChannel[ChannelTypeIndex] += TokenSendBunch.NumPayloadBits; } else { SendBunchCountPerChannel.Add(ChannelTypeIndex, 1); SendBunchSizeBitsPerChannel.Add(ChannelTypeIndex, TokenSendBunch.GetNumTotalBits()); SendBunchHeaderSizeBitsPerChannel.Add(ChannelTypeIndex, TokenSendBunch.NumHeaderBits); SendBunchPayloadSizeBitsPerChannel.Add(ChannelTypeIndex, TokenSendBunch.NumPayloadBits); } break; case ETokenTypes.SendRPC: var TokenSendRPC = (TokenSendRPC)Token; RPCCount++; RPCSizeBits += TokenSendRPC.GetNumTotalBits(); break; case ETokenTypes.ReplicateActor: var TokenReplicateActor = (TokenReplicateActor)Token; ActorCount++; if (TokenReplicateActor.Properties.Count > 0) { ReplicatedActorCount++; } ActorReplicateTimeInMS += TokenReplicateActor.TimeInMS; foreach (var Property in TokenReplicateActor.Properties) { if (Property.MatchesFilters(InFilterValues)) { PropertyCount++; ReplicatedSizeBits += Property.NumBits; } } foreach (var PropertyHeader in TokenReplicateActor.PropertyHeaders) { if (PropertyHeader.MatchesFilters(InFilterValues)) { ReplicatedSizeBits += PropertyHeader.NumBits; } } UniqueActors.AddItem(TokenReplicateActor, TokenReplicateActor.GetClassNameIndex()); break; case ETokenTypes.Event: NumEvents++; break; case ETokenTypes.RawSocketData: break; case ETokenTypes.SendAck: var TokenSendAck = (TokenSendAck)Token; SendAckCount++; SendAckSizeBits += TokenSendAck.NumBits; break; case ETokenTypes.ExportBunch: var TokenExportBunch = (TokenExportBunch)Token; ExportBunchCount++; ExportBunchSizeBits += TokenExportBunch.NumBits; break; case ETokenTypes.MustBeMappedGuids: var TokenMustBeMappedGuids = (TokenMustBeMappedGuids)Token; MustBeMappedGuidCount += TokenMustBeMappedGuids.NumGuids; MustBeMappedGuidSizeBits += TokenMustBeMappedGuids.NumBits; break; case ETokenTypes.BeginContentBlock: var TokenBeginContentBlock = (TokenBeginContentBlock)Token; ContentBlockHeaderCount++; ContentBlockHeaderSizeBits += TokenBeginContentBlock.NumBits; break; case ETokenTypes.EndContentBlock: var TokenEndContentBlock = (TokenEndContentBlock)Token; ContentBlockFooterCount++; ContentBlockFooterSizeBits += TokenEndContentBlock.NumBits; break; case ETokenTypes.WritePropertyHandle: var TokenWritePropertyHandle = (TokenWritePropertyHandle)Token; PropertyHandleCount++; PropertyHandleSizeBits += TokenWritePropertyHandle.NumBits; break; default: throw new System.IO.InvalidDataException(); } }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against */ public virtual bool MatchesFilters( FilterValues InFilterValues ) { if ( TokenType == ETokenTypes.FrameMarker || TokenType == ETokenTypes.EndOfStreamMarker ) { return true; } return InFilterValues.ConnectionMask == null || InFilterValues.ConnectionMask.Contains( ConnectionIndex ); }
/** * Returns the number of bits for this replicated actor while taking filters into account. * * @param ActorFilter Filter for actor name * @param PropertyFilter Filter for property name * @param RPCFilter Unused */ public int GetNumReplicatedBits( FilterValues InFilterValues ) { int NumReplicatedBits = 0; foreach( var Property in Properties ) { if( Property.MatchesFilters( InFilterValues ) ) { NumReplicatedBits += Property.NumBits; } } foreach( var PropertyHeader in PropertyHeaders ) { if( PropertyHeader.MatchesFilters( InFilterValues ) ) { NumReplicatedBits += PropertyHeader.NumBits; } } return NumReplicatedBits; }
public static void ParseStreamIntoChart(MainWindow InMainWindow, NetworkStream InStream, WpfPlot NetworkChart, FilterValues InFilterValues) { var StartTime = DateTime.UtcNow; InMainWindow.ShowProgress(true); NetworkChart.Plot.Clear(); for (int i = 0; i < InMainWindow.DefaultSeriesTypes.Count; i++) { float Percent = (float)i / (float)InMainWindow.DefaultSeriesTypes.Count; InMainWindow.UpdateProgress((int)(Percent * 100)); InMainWindow.DefaultSeriesTypes[i].Reset(); } int FrameCounter = 0; foreach (PartialNetworkStream RawFrame in InStream.Frames) { if (FrameCounter % 1000 == 0) { float Percent = (float)FrameCounter / (float)InStream.Frames.Count; InMainWindow.UpdateProgress((int)(Percent * 100)); } PartialNetworkStream Frame = RawFrame.Filter(InFilterValues); if (Frame.EndTime == Frame.StartTime) { throw new InvalidOperationException("End time and Start time cannot be same."); } float OneOverDeltaTime = 1 / (Frame.EndTime - Frame.StartTime); int OutgoingBandwidth = Frame.UnrealSocketSize + Frame.OtherSocketSize + NetworkStream.PacketOverhead * (Frame.UnrealSocketCount + Frame.OtherSocketCount); InMainWindow.AddChartPoint(SeriesType.OutgoingBandwidthSize, FrameCounter, OutgoingBandwidth); InMainWindow.AddChartPoint(SeriesType.OutgoingBandwidthSizeSec, FrameCounter, OutgoingBandwidth * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ActorCount, FrameCounter, Frame.ActorCount); InMainWindow.AddChartPoint(SeriesType.PropertySize, FrameCounter, Frame.ReplicatedSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.PropertySizeSec, FrameCounter, Frame.ReplicatedSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.RPCSize, FrameCounter, Frame.RPCSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.RPCSizeSec, FrameCounter, Frame.RPCSizeBits / 8 * OneOverDeltaTime); #if true InMainWindow.AddChartPoint(SeriesType.ActorCountSec, FrameCounter, Frame.ActorCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.PropertyCount, FrameCounter, Frame.PropertyCount); InMainWindow.AddChartPoint(SeriesType.PropertyCountSec, FrameCounter, Frame.PropertyCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.RPCCount, FrameCounter, Frame.RPCCount); InMainWindow.AddChartPoint(SeriesType.RPCCountSec, FrameCounter, Frame.RPCCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ExportBunchCount, FrameCounter, Frame.ExportBunchCount); InMainWindow.AddChartPoint(SeriesType.ExportBunchSize, FrameCounter, Frame.ExportBunchSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.MustBeMappedGuidsCount, FrameCounter, Frame.MustBeMappedGuidCount / 8); InMainWindow.AddChartPoint(SeriesType.MustBeMappedGuidsSize, FrameCounter, Frame.MustBeMappedGuidSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendAckCount, FrameCounter, Frame.SendAckCount); InMainWindow.AddChartPoint(SeriesType.SendAckCountSec, FrameCounter, Frame.SendAckCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendAckSize, FrameCounter, Frame.SendAckSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendAckSizeSec, FrameCounter, Frame.SendAckSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ContentBlockHeaderSize, FrameCounter, Frame.ContentBlockHeaderSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.ContentBlockFooterSize, FrameCounter, Frame.ContentBlockFooterSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.PropertyHandleSize, FrameCounter, Frame.PropertyHandleSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendBunchCount, FrameCounter, Frame.SendBunchCount); InMainWindow.AddChartPoint(SeriesType.SendBunchCountSec, FrameCounter, Frame.SendBunchCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendBunchSize, FrameCounter, Frame.SendBunchSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendBunchSizeSec, FrameCounter, Frame.SendBunchSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendBunchHeaderSize, FrameCounter, Frame.SendBunchHeaderSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.GameSocketSendSize, FrameCounter, Frame.UnrealSocketSize); InMainWindow.AddChartPoint(SeriesType.GameSocketSendSizeSec, FrameCounter, Frame.UnrealSocketSize * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.GameSocketSendCount, FrameCounter, Frame.UnrealSocketCount); InMainWindow.AddChartPoint(SeriesType.GameSocketSendCountSec, FrameCounter, Frame.UnrealSocketCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ActorReplicateTimeInMS, FrameCounter, Frame.ActorReplicateTimeInMS); #endif #if false InMainWindow.AddChartPoint(SeriesType.MiscSocketSendSize, FrameCounter, Frame.OtherSocketSize); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendSizeSec, FrameCounter, Frame.OtherSocketSize * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendCount, FrameCounter, Frame.OtherSocketCount); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendCountSec, FrameCounter, Frame.OtherSocketCount * OneOverDeltaTime); #endif if (Frame.NumEvents > 0) { InMainWindow.AddChartPoint(SeriesType.Events, FrameCounter, 0); } FrameCounter++; } InMainWindow.ShowProgress(false); Console.WriteLine("Adding data to chart took {0} seconds", (DateTime.UtcNow - StartTime).TotalSeconds); InMainWindow.Dispatcher.Invoke(new Action(() => InMainWindow.UpdateNetworkChart())); }
public override void ToDetailedTreeView( TreeNodeCollection Tree, FilterValues InFilterValues ) { TreeNode Child = TokenHelper.AddNode( Tree, "RPCs" ); Child = Child.Nodes.Add( NetworkStream.GetName( FunctionNameIndex ) ); Child.Nodes.Add( "Actor : " + NetworkStream.GetName( ActorNameIndex ) ); Child.Nodes.Add( "NumTotalBits : " + GetNumTotalBits() ); Child.Nodes.Add( " NumHeaderBits : " + NumHeaderBits ); Child.Nodes.Add( " NumParameterBits : " + NumParameterBits ); Child.Nodes.Add( " NumFooterBits : " + NumFooterBits ); Child.Nodes.Add( "NumTotalBytes : " + GetNumTotalBits() / 8.0f ); }
/** * Dumps actor tokens into a list view for viewing performance/bandwidth */ public void ToActorPerformanceView(NetworkStream NetworkStream, ListView ListView, ListView PropertyListView, FilterValues InFilterValues) { var ActorDetailList = UniqueActors.UniqueItems.OrderByDescending(s => s.Value.TimeInMS).ToList(); bool bFirstView = ListView.Items.Count == 0; ListView.Items.Clear(); float OneOverDeltaTime = 1 / (EndTime - StartTime); var Columns = new string[8]; foreach (var UniqueActor in ActorDetailList) { long NumActorBytes = (UniqueActor.Value.SizeBits + 7) / 8; Columns[0] = NetworkStream.GetName(UniqueActor.Key); Columns[1] = UniqueActor.Value.TimeInMS.ToString("0.00"); Columns[2] = (NumActorBytes * OneOverDeltaTime / 1024.0f).ToString("0.00"); Columns[3] = NumActorBytes.ToString(); Columns[4] = UniqueActor.Value.Count.ToString(); Columns[5] = (UniqueActor.Value.Count * OneOverDeltaTime).ToString("0.00"); Columns[6] = (UniqueActor.Value.ReplicatedCount * OneOverDeltaTime).ToString("0.00"); Columns[7] = UniqueActor.Value.Count > 0 ? (100.0f - (( float )UniqueActor.Value.ReplicatedCount / ( float )UniqueActor.Value.Count * 100.0f)).ToString("0.00") : "0"; ListView.Items.Add(new ListViewItem(Columns)); } if (bFirstView) { ListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); ListView.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize); } /* * if ( ListView.Items.Count > 0 ) * { * ToPropertyPerformanceView( NetworkStream, ListView.Items[0].Text, PropertyListView, InFilterValues ); * } */ }
/** * Dumps property tokens into a list view for viewing performance/bandwidth */ public void ToPropertyPerformanceView(NetworkStream NetworkStream, string ActorClassName, ListView ListView, FilterValues InFilterValues) { ListView.Items.Clear(); UniqueActor Actor; int Index = NetworkStream.GetIndexFromClassName(ActorClassName); if (Index != -1 && UniqueActors.UniqueItems.TryGetValue(Index, out Actor)) { var Columns = new string[3]; foreach (var Property in Actor.Properties.UniqueItems) { Columns[0] = NetworkStream.GetName(Property.Key); Columns[1] = ((Property.Value.SizeBits + 7) / 8).ToString(); Columns[2] = Property.Value.Count.ToString(); ListView.Items.Add(new ListViewItem(Columns)); } } }
public static void ParseStreamIntoChart(MainWindow InMainWindow, NetworkStream NetworkStream, Chart NetworkChart, FilterValues InFilterValues) { var StartTime = DateTime.UtcNow; InMainWindow.ShowProgress(true); // Save old scroll position double OldPosition = NetworkChart.ChartAreas["DefaultChartArea"].AxisX.ScaleView.Position; NetworkChart.BeginInit(); // Reset existing data. for (int i = 0; i < NetworkChart.Series.Count; i++) { float Percent = ( float )i / ( float )NetworkChart.Series.Count; InMainWindow.UpdateProgress(( int )(Percent * 100)); NetworkChart.Series[i].Points.Clear(); } InMainWindow.ShowProgress(true); NetworkChart.ResetAutoValues(); NetworkChart.Invalidate(); NetworkChart.ChartAreas[0].AxisX.ScrollBar.IsPositionedInside = false; NetworkChart.ChartAreas[0].AxisX.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All; NetworkChart.ChartAreas[0].AxisX.ScrollBar.Size = 15; NetworkChart.ChartAreas[0].AxisX.ScrollBar.ButtonColor = Color.LightGray; NetworkChart.ChartAreas[0].AxisY.ScrollBar.IsPositionedInside = false; NetworkChart.ChartAreas[0].AxisY.ScrollBar.ButtonStyle = ScrollBarButtonStyles.All; NetworkChart.ChartAreas[0].AxisY.ScrollBar.Size = 15; NetworkChart.ChartAreas[0].AxisY.ScrollBar.ButtonColor = Color.LightGray; int FrameCounter = 0; foreach (PartialNetworkStream RawFrame in NetworkStream.Frames) { if (FrameCounter % 1000 == 0) { float Percent = ( float )FrameCounter / ( float )NetworkStream.Frames.Count; InMainWindow.UpdateProgress(( int )(Percent * 100)); } PartialNetworkStream Frame = RawFrame.Filter(InFilterValues); if (Frame.EndTime == Frame.StartTime) { throw new InvalidOperationException(); } float OneOverDeltaTime = 1 / (Frame.EndTime - Frame.StartTime); int OutgoingBandwidth = Frame.UnrealSocketSize + Frame.OtherSocketSize + NetworkStream.PacketOverhead * (Frame.UnrealSocketCount + Frame.OtherSocketCount); InMainWindow.AddChartPoint(SeriesType.OutgoingBandwidthSize, FrameCounter, OutgoingBandwidth); InMainWindow.AddChartPoint(SeriesType.OutgoingBandwidthSizeSec, FrameCounter, OutgoingBandwidth * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ActorCount, FrameCounter, Frame.ActorCount); InMainWindow.AddChartPoint(SeriesType.PropertySize, FrameCounter, Frame.ReplicatedSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.PropertySizeSec, FrameCounter, Frame.ReplicatedSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.RPCSize, FrameCounter, Frame.RPCSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.RPCSizeSec, FrameCounter, Frame.RPCSizeBits / 8 * OneOverDeltaTime); #if true InMainWindow.AddChartPoint(SeriesType.ActorCountSec, FrameCounter, Frame.ActorCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.PropertyCount, FrameCounter, Frame.PropertyCount); InMainWindow.AddChartPoint(SeriesType.PropertyCountSec, FrameCounter, Frame.PropertyCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.RPCCount, FrameCounter, Frame.RPCCount); InMainWindow.AddChartPoint(SeriesType.RPCCountSec, FrameCounter, Frame.RPCCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ExportBunchCount, FrameCounter, Frame.ExportBunchCount); InMainWindow.AddChartPoint(SeriesType.ExportBunchSize, FrameCounter, Frame.ExportBunchSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.MustBeMappedGuidsCount, FrameCounter, Frame.MustBeMappedGuidCount / 8); InMainWindow.AddChartPoint(SeriesType.MustBeMappedGuidsSize, FrameCounter, Frame.MustBeMappedGuidSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendAckCount, FrameCounter, Frame.SendAckCount); InMainWindow.AddChartPoint(SeriesType.SendAckCountSec, FrameCounter, Frame.SendAckCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendAckSize, FrameCounter, Frame.SendAckSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendAckSizeSec, FrameCounter, Frame.SendAckSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ContentBlockHeaderSize, FrameCounter, Frame.ContentBlockHeaderSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.ContentBlockFooterSize, FrameCounter, Frame.ContentBlockFooterSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.PropertyHandleSize, FrameCounter, Frame.PropertyHandleSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendBunchCount, FrameCounter, Frame.SendBunchCount); InMainWindow.AddChartPoint(SeriesType.SendBunchCountSec, FrameCounter, Frame.SendBunchCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendBunchSize, FrameCounter, Frame.SendBunchSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.SendBunchSizeSec, FrameCounter, Frame.SendBunchSizeBits / 8 * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.SendBunchHeaderSize, FrameCounter, Frame.SendBunchHeaderSizeBits / 8); InMainWindow.AddChartPoint(SeriesType.GameSocketSendSize, FrameCounter, Frame.UnrealSocketSize); InMainWindow.AddChartPoint(SeriesType.GameSocketSendSizeSec, FrameCounter, Frame.UnrealSocketSize * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.GameSocketSendCount, FrameCounter, Frame.UnrealSocketCount); InMainWindow.AddChartPoint(SeriesType.GameSocketSendCountSec, FrameCounter, Frame.UnrealSocketCount * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.ActorReplicateTimeInMS, FrameCounter, Frame.ActorReplicateTimeInMS); #endif #if false InMainWindow.AddChartPoint(SeriesType.MiscSocketSendSize, FrameCounter, Frame.OtherSocketSize); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendSizeSec, FrameCounter, Frame.OtherSocketSize * OneOverDeltaTime); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendCount, FrameCounter, Frame.OtherSocketCount); InMainWindow.AddChartPoint(SeriesType.MiscSocketSendCountSec, FrameCounter, Frame.OtherSocketCount * OneOverDeltaTime); #endif if (Frame.NumEvents > 0) { InMainWindow.AddChartPoint(SeriesType.Events, FrameCounter, 0); } FrameCounter++; } //NetworkChart.DataManipulator.FinancialFormula( FinancialFormula.MovingAverage, "30", SeriesType.GameSocketSendSizeSec, SeriesType.GameSocketSendSizeAvgSec ); NetworkChart.DataManipulator.FinancialFormula(FinancialFormula.MovingAverage, "30", SeriesType.OutgoingBandwidthSizeSec.ToString(), SeriesType.OutgoingBandwidthSizeAvgSec.ToString()); NetworkChart.ChartAreas["DefaultChartArea"].RecalculateAxesScale(); NetworkChart.ChartAreas["DefaultChartArea"].AxisX.ScaleView.Position = OldPosition; NetworkChart.EndInit(); InMainWindow.ShowProgress(false); Console.WriteLine("Adding data to chart took {0} seconds", (DateTime.UtcNow - StartTime).TotalSeconds); }
/** * Returns whether the token matches/ passes based on the passed in filters. * * @param ActorFilter Actor filter to match against * @param PropertyFilter Property filter to match against * @param RPCFilter RPC filter to match against * * @return true if it matches, false otherwise */ public override bool MatchesFilters( FilterValues InFilterValues ) { bool ContainsMatchingProperty = false || ( Properties.Count == 0 && InFilterValues.PropertyFilter.Length == 0 ); foreach( var Property in Properties ) { if( Property.MatchesFilters( InFilterValues ) ) { ContainsMatchingProperty = true; break; } } return base.MatchesFilters( InFilterValues ) && ( InFilterValues.ActorFilter.Length == 0 || NetworkStream.GetName( ActorNameIndex ).ToUpperInvariant().Contains( InFilterValues.ActorFilter.ToUpperInvariant() ) ) && ContainsMatchingProperty; }