Skip to content

Instantly share code, notes, and snippets.

@gregoryyoung
Created December 30, 2015 16:57
Show Gist options
  • Save gregoryyoung/d8005ff9784ec6450870 to your computer and use it in GitHub Desktop.
Save gregoryyoung/d8005ff9784ec6450870 to your computer and use it in GitHub Desktop.
> mostAllocatedTypes() |> Seq.head;;
val it : profilersession.TypeInformation =
Name: System.String
Allocs: 5760 Size : 940.89KB
Thrown: 0
Allocated By:
--------------------------------------------------------------------------------
| 2|System.Void EventStore.Core.Services.Monitoring.MonitoringService:OnTimerTick (object)|
| 4|System.Void EventStore.Core.Services.Monitoring.MonitoringService:CollectRegularStats ()|
| 104|EventStore.Core.Services.Monitoring.Stats.StatsContainer EventStore.Core.Services.Monitoring.MonitoringService:CollectStats ()|
| 4|EventStore.Common.Log.ILogger EventStore.Common.Log.LogManager:GetLoggerFor ()|
| 928|System.Collections.Generic.IDictionary<System.String,System.Object> EventStore.Core.Services.Monitoring.SystemStatsHelper:GetSystemStats ()|
| 304|System.Void EventStore.Core.Services.Monitoring.SystemStatsHelper:GetPerfCounterInformation (System.Collections.Generic.Dictionary`2<string, object>,int)|
| 6|System.Int64 EventStore.Core.Services.Monitoring.SystemStatsHelper:GetFreeMem ()|
| 20|System.String EventStore.Common.Utils.ShellExecutor:GetOutput (string,string)|
| 124|System.Int64 EventStore.Core.Services.Monitoring.SystemStatsHelper:GetFreeMemOnOSX ()|
| 2|EventStore.Core.Services.Monitoring.Stats.DiskIo EventStore.Core.Services.Monitoring.Stats.DiskIo:GetDiskIo (int,EventStore.Common.Log.ILogger)|
| 12|EventStore.Core.Services.Monitoring.Stats.DiskIo EventStore.Core.Services.Monitoring.Stats.DiskIo:GetOnUnix (int,EventStore.Common.Log.ILogger)|
| 4|EventStore.Transport.Tcp.TcpStats EventStore.Transport.Tcp.TcpConnectionMonitor:GetTcpStats ()|
| 8|System.Boolean EventStore.Common.Utils.Application:IsDefined (string)|
| 46|EventStore.Core.Services.Monitoring.Stats.EsDriveInfo EventStore.Core.Services.Monitoring.Stats.EsDriveInfo:FromDirectory (string,EventStore.Common.Log.ILogger)|
| 52|System.String EventStore.Core.Services.Monitoring.Stats.EsDriveInfo:GetDirectoryRootInUnix (string,EventStore.Common.Log.ILogger)|
| 8|System.Void EventStore.Core.Services.Monitoring.Stats.EsDriveInfo:.ctor (string,long,long)|
| 16|System.String EventStore.Core.Services.Monitoring.SystemStatsHelper:<GetSystemStats>m__0 (string,string)|
| 2|EventStore.Core.Services.Monitoring.Stats.QueueStats[] EventStore.Core.Bus.QueueMonitor:GetStats ()|
| 884|System.String EventStore.Core.Services.Monitoring.SystemStatsHelper:<GetSystemStats>m__1 (string,string)|
| 40|System.Boolean EventStore.Core.Bus.MessageHandler`1:TryHandle (EventStore.Core.Messaging.Message)|
| 2|System.Void EventStore.Core.Services.Storage.StorageWriterService:Handle (EventStore.Core.Messages.MonitoringMessage/InternalStatsRequest)|
| 6|System.Void EventStore.Core.Services.Monitoring.MonitoringService:SaveStatsToCsvFile (System.Collections.Generic.Dictionary`2<string, object>)|
| 6|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:GetHeader (System.Collections.Generic.Dictionary`2<string, object>)|
| 12|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:Join (System.Collections.Generic.IEnumerable`1<object>)|
| 8|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:Prepend (string,string)|
| 24|NLog.Internal.LoggerConfiguration NLog.LogFactory:GetConfigurationForLogger (string,NLog.Config.LoggingConfiguration)|
| 22|System.String NLog.Layouts.SimpleLayout:GetFormattedMessage (NLog.LogEventInfo)|
| 4|System.Void NLog.LayoutRenderers.LiteralLayoutRenderer:Append (System.Text.StringBuilder,NLog.LogEventInfo)|
| 36|System.Void NLog.LayoutRenderers.ShortDateLayoutRenderer:Append (System.Text.StringBuilder,NLog.LogEventInfo)|
| 8|System.String NLog.Internal.EnvironmentHelper:GetSafeEnvironmentVariable (string)|
| 16|NLog.LayoutRenderers.LayoutRenderer[] NLog.Layouts.LayoutParser:CompileLayout (NLog.Config.ConfigurationItemFactory,NLog.Internal.SimpleStringReader,bool,string&)|
| 402|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:TryGetInvariantString (object)|
| 6|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:GetLine (System.Collections.Generic.Dictionary`2<string, object>)|
| 76|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:PrependTime (string)|
| 4|System.String Newtonsoft.Json.JsonConvert:SerializeObjectInternal (object,System.Type,Newtonsoft.Json.JsonSerializer)|
| 22|System.Reflection.ConstructorInfo Newtonsoft.Json.Utilities.CollectionUtils:ResolveEnumableCollectionConstructor (System.Type,System.Type)|
| 134|System.Boolean Newtonsoft.Json.Utilities.TypeExtensions:AssignableToTypeName (System.Type,string,System.Type&)|
| 2|System.Reflection.ConstructorInfo Newtonsoft.Json.Utilities.ReflectionUtils:GetDefaultConstructor (System.Type,bool)|
| 44|System.Boolean Newtonsoft.Json.Utilities.ReflectionUtils:<GetDefaultConstructor>b__0 (System.Reflection.ConstructorInfo)|
| 10|System.Func<T> Newtonsoft.Json.Utilities.DynamicReflectionDelegateFactory:CreateDefaultConstructor (System.Type)|
| 708|System.Void Newtonsoft.Json.Serialization.DefaultContractResolver:GetCallbackMethodsForType (System.Type,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationCallback>&,System.Collections.Generic.List`1<Newtonsoft.Json.Serialization.SerializationErrorCallback>&)|
| 18|System.Boolean Newtonsoft.Json.Converters.DiscriminatedUnionConverter:CanConvert (System.Type)|
| 1088| System.Void Newtonsoft.Json.JsonTextWriter:WriteIndent ()|
| 26|System.Void Newtonsoft.Json.JsonTextWriter:WriteEscapedString (string,bool)|
| 2|System.Void Newtonsoft.Json.JsonTextWriter:WriteValue (single)|
| 42|System.String Newtonsoft.Json.JsonConvert:ToString (single,Newtonsoft.Json.FloatFormatHandling,char,bool)|
| 48|System.String Newtonsoft.Json.JsonConvert:EnsureDecimalPlace (double,string)|
| 18|System.Void Newtonsoft.Json.Utilities.JavaScriptUtils:WriteEscapedJavaScriptString (System.IO.TextWriter,string,char,bool,bool[],Newtonsoft.Json.StringEscapeHandling,char[]&)|
| 2|System.Void Newtonsoft.Json.JsonTextWriter:WriteValue (double)|
| 256|System.String Newtonsoft.Json.JsonConvert:ToString (double,Newtonsoft.Json.FloatFormatHandling,char,bool)|
| 22|System.String Newtonsoft.Json.JsonConvert:ToString (System.TimeSpan,char)|
| 4|System.IO.StringWriter Newtonsoft.Json.Utilities.StringUtils:CreateStringWriter (int)|
| 2|System.Void Newtonsoft.Json.JsonTextWriter:WriteIndentSpace ()|
| 2|System.Void Newtonsoft.Json.JsonTextWriter:WriteIntegerValue (ulong)|
| 10|EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord EventStore.Core.TransactionLog.LogRecords.LogRecord:Prepare (long,System.Guid,System.Guid,long,int,string,int,EventStore.Core.TransactionLog.LogRecords.PrepareFlags,string,byte[],byte[],System.Nullable`1<System.DateTime>)|
| 8|System.Void EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord:.ctor (System.IO.BinaryReader,byte,long)|
| 6|System.Void EventStore.Core.Services.Storage.StorageChaser:ProcessPrepareRecord (EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord,bool)|
| 12|System.String NLog.Targets.FileTarget:CleanupFileName (string)|
| 8|System.Byte[] NLog.Targets.FileTarget:GetBytesToWrite (NLog.LogEventInfo)|
| 20|System.Boolean NLog.Internal.FileAppenders.RetryingMultiProcessFileAppender:GetFileInfo (System.DateTime&,long&)|
| 40|System.IO.FileStream NLog.Internal.FileAppenders.BaseFileAppender:TryCreateFileStream (bool)|
| 2|System.Single EventStore.Core.Services.Monitoring.Utils.PerfCounterHelper:GetProcCpuUsage ()|
| 2|System.Void Newtonsoft.Json.JsonTextWriter:WriteValueInternal (string,Newtonsoft.Json.JsonToken)|
--------------------------------------------------------------------------------
Actual Allocations By
--------------------------------------------------------------------------------
| 2|System.Void EventStore.Core.Services.Monitoring.MonitoringService:OnTimerTick (object)|
| 2|System.Void EventStore.Core.Services.Monitoring.MonitoringService:CollectRegularStats ()|
| 10|EventStore.Core.Services.Monitoring.Stats.StatsContainer EventStore.Core.Services.Monitoring.MonitoringService:CollectStats ()|
| 214|System.String System.RuntimeType:get_Name (System.RuntimeType)|
| 90|EventStore.Common.Log.ILogger EventStore.Common.Log.LogManager:GetLoggerFor ()|
| 38|System.Collections.Generic.IDictionary<System.String,System.Object> EventStore.Core.Services.Monitoring.SystemStatsHelper:GetSystemStats ()|
| 2|System.Globalization.CalendarData System.Globalization.CultureData:GetCalendar (int)|
| 4176| System.String System.String:InternalAllocateStr (int)|
| 174|System.Boolean System.Globalization.CalendarData:fill_calendar_data (System.Globalization.CalendarData,string,int)|
| 32|System.Void System.Globalization.CalendarData:.ctor (string,int,bool)|
| 10|System.String System.DateTimeFormat:ExpandPredefinedFormat (string,System.DateTime&,System.Globalization.DateTimeFormatInfo&,System.TimeSpan&)|
| 4|System.String System.DateTimeFormat:FormatCustomized (System.DateTime,string,System.Globalization.DateTimeFormatInfo,System.TimeSpan)|
| 6|System.Int64 EventStore.Core.Services.Monitoring.SystemStatsHelper:GetFreeMem ()|
| 2|EventStore.Core.Services.Monitoring.Stats.DiskIo EventStore.Core.Services.Monitoring.Stats.DiskIo:GetDiskIo (int,EventStore.Common.Log.ILogger)|
| 4|EventStore.Transport.Tcp.TcpStats EventStore.Transport.Tcp.TcpConnectionMonitor:GetTcpStats ()|
| 4|System.Void EventStore.Core.Services.Monitoring.Stats.GcStats:.ctor (long,long,long,long,long,long,long,single,single,long)|
| 8|EventStore.Core.Services.Monitoring.Stats.EsDriveInfo EventStore.Core.Services.Monitoring.Stats.EsDriveInfo:FromDirectory (string,EventStore.Common.Log.ILogger)|
| 6|System.String EventStore.Common.Utils.ShellExecutor:GetOutput (string,string)|
| 16|System.String[] System.Environment:GetLogicalDrivesInternal ()|
| 16| System.String System.IO.DriveInfo:GetDriveFormat (string)|
| 8|System.Void EventStore.Core.Services.Monitoring.Stats.EsDriveInfo:.ctor (string,long,long)|
| 16|System.Reflection.RuntimeConstructorInfo[] System.RuntimeType:GetConstructors_internal (System.RuntimeType,System.Reflection.BindingFlags,System.Type)|
| 2|System.Boolean EventStore.Common.Utils.Application:IsDefined (string)|
| 4|System.String System.Globalization.TimeSpanFormat:Format (System.TimeSpan,string,System.IFormatProvider)|
| 6|System.String EventStore.Core.Services.Monitoring.SystemStatsHelper:<GetSystemStats>m__1 (string,string)|
| 40|System.Boolean EventStore.Core.Bus.MessageHandler`1:TryHandle (EventStore.Core.Messaging.Message)|
| 2|System.Void EventStore.Core.Services.Monitoring.Stats.StatMetadata:.ctor (object,string,string,bool)|
| 6|System.Void EventStore.Core.Services.Monitoring.MonitoringService:SaveStatsToCsvFile (System.Collections.Generic.Dictionary`2<string, object>)|
| 2|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:GetHeader (System.Collections.Generic.Dictionary`2<string, object>)|
| 4|TResult .<CombineSelectors>c__AnonStorey1B`3:<>m__0 (TSource)|
| 10|System.String EventStore.Core.Services.Monitoring.Utils.StatsCsvEncoder:<Join>m__0 (string)|
| 8|System.String System.Environment:internalGetEnvironmentVariable (string)|
| 2|System.Void EventStore.Common.Log.LazyLogger:Info (string,object[])|
| 670|System.Reflection.ParameterInfo[] System.Reflection.MonoMethodInfo:get_parameter_info (intptr,System.Reflection.MemberInfo)|
| 10|System.String System.RuntimeType:getFullName (System.RuntimeType,bool,bool)|
| 92|System.Reflection.RuntimeMethodInfo[] System.RuntimeType:GetMethodsByName (System.RuntimeType,string,System.Reflection.BindingFlags,bool,System.Type)|
| 26|System.Void Newtonsoft.Json.JsonTextWriter:WriteEscapedString (string,bool)|
| 4|System.Void Newtonsoft.Json.JsonWriter:AutoComplete (Newtonsoft.Json.JsonToken)|
| 10|System.Double System.Double:Parse (string,System.Globalization.NumberStyles,System.IFormatProvider)|
| 4|System.String Newtonsoft.Json.JsonConvert:ToString (single,Newtonsoft.Json.FloatFormatHandling,char,bool)|
| 10|EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord EventStore.Core.TransactionLog.LogRecords.LogRecord:Prepare (long,System.Guid,System.Guid,long,int,string,int,EventStore.Core.TransactionLog.LogRecords.PrepareFlags,string,byte[],byte[],System.Nullable`1<System.DateTime>)|
| 6|System.Int32 EventStore.Core.Services.Storage.ReaderIndex.IndexCommitter:Commit (System.Collections.Generic.IList`1<EventStore.Core.TransactionLog.LogRecords.PrepareLogRecord>,bool)|
| 2|System.Single System.Diagnostics.PerformanceCounter:NextValue ()|
--------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment